aboutsummaryrefslogtreecommitdiff
path: root/src/tests/run.rs
Commit message (Collapse)AuthorAge
* Update nitrokey to v0.8.0Robin Krahl2020-10-02
| | | | | | This patch updates the nitrokey dependency to version 0.8.0 and applies all breaking changes (Config fields renaming, DeviceWrapper and Model non-exhaustiveness, changed Display implementation for Model).
* Add --usb-path option to select deviceRobin Krahl2020-09-09
| | | | | | | | | | | | | This patch adds the --usb-path option as an additional way to filter the Nitrokey device to connect to. While the serial number is a better identifier in theory, the Nitrokey Storage devices do not send their serial number in the USB device descriptor. Having the --usb-path options allows users to select one of multiple Nitrokey Storage devices. While we could directly call the nitrokey::Manager::connect_path function with the specified path, we integrate the --usb-path option into the existing find_device function for consistent error messages and to avoid having to duplicate the --model and --serial-number checks.
* Add test cases for new connection logicRobin Krahl2020-09-07
| | | | | | | | | | | | | This patch adds test cases for the new connection logic: - connect_multiple checks that nitrocli aborts if more than one Nitrokey device is connected and no filter is set. - connect_serial_number checks that we can use the --serial-number option to connect to all supported Nitrokey devices. - connect_wrong_serial_number checks that nitrocli aborts if it can’t find a device with the requested serial number. - connect_model checks that we can use the --model option to select the Nitrokey device to connect to, and that nitrocli aborts if it finds no matching device or multiple matching devices.
* Adjust copyright & license specification to comply with REUSE 3.0Daniel Mueller2020-09-02
| | | | | | | | With this change we switch to using a REUSE compliant way of specifying the copyright & license of the program. To be fully in conformance we also add additional license specifications for the remaining files in the project. Lastly, a new CI pipeline rule takes care of verifying compliance on an ongoing basis.
* Adjust copyright string to refer to The Nitrocli DevelopersDaniel Mueller2020-09-01
| | | | | This change adjusts the copyright header in all files to no longer mention individuals but refer to The Nitrocli Developers in general.
* Add config test case and example config fileRobin Krahl2020-09-05
| | | | | | | | This patch adds a simple configuration file that demonstrates the syntax and contains some documentation. We suggest to ship this file together with nitrocli and to install it e.g., in the /usr/share/doc/nitrocli directory. This patch also adds a simple test case that makes sure that the example file is parsed correctly.
* Replace argparse with structoptRobin Krahl2020-01-07
| | | | | | | | | | | | This patch changes the argument handling code to use structopt instead of argparse using the data structures we introduced in the last patch. As part of that transition we replace the old Error::ArgparseError variant with ClapError that stores a structopt::clap::Error. Because of that replacement, the format of the help messages changed, breaking some of the tests. Hence, this change adapts them accordingly. Also clap currently prints the version output to stdout, so we ignore the version_option test case for now.
* Move nitrocli source code into repository rootDaniel Mueller2020-04-04
Now that all vendored dependencies have been removed, this change moves the program's source code from the nitrocli/ directory into the root of the repository.