summaryrefslogtreecommitdiff
path: root/src/tests/device.rs
Commit message (Collapse)AuthorAge
* Use Result<(), CommandError> instead of CommandStatusRobin Krahl2018-06-07
| | | | | | The Result enum is more idiomatic and easier to use than our custom CommandStatus enum with the same structure. This is especially true for the try operator ?.
* Use Storage struct for Storage-specific testsRobin Krahl2018-06-07
|
* Add support for encrypted volumeRobin Krahl2018-06-07
| | | | | | | | | | | | | | | | | This patch adds support for the commands to enable or disable the encrypted volume on the Nitrokey Storage. To test these commands, the output of lsblk is parsed for the device model “Nitrokey Storage”. This is not perfect but seems to be the best solution for automated testing. As the effect of enabling and disabling volumes is not immediate, a delay of two seconds is added to the tests before checking lsblk. This is sufficient on my machine, yet it would be better to have a portable version of this check. This patch also adds a lock method to Device that executes the lock_device command. This command was previously only used to close the password safe. On the Nitrokey Storage, it also disables the encrypted and hidden volume.
* Remove tests for specific firmware versionsRobin Krahl2018-06-06
| | | | | | The firmware version is too volatile to restrict it to certain values. Therefore, we only check that there is a non-zero version number instead of expecting specific values.
* Add support for unlock_user_password commandRobin Krahl2018-05-31
|
* Fix formatting issuesRobin Krahl2018-05-31
|
* Add rudimentary support for the Nitrokey StorageRobin Krahl2018-05-29
| | | | | This patch adds the Storage struct and the test-storage feature. It also enables all currently supported Pro commands for the Storage.
* Group tests by tested functionalityRobin Krahl2018-05-28