aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2020-01-14 13:48:56 +0100
committerRobin Krahl <robin.krahl@ireas.org>2020-01-14 16:53:45 +0100
commitf266ea63039c87886f871b068ef3dcdf851a1eca (patch)
tree35780d1b6137768d6f2ec3780b071fa278330e92 /tests
parenteb04dafce313ff5349b1c93d8d87cb53ba320e7e (diff)
downloadnitrokey-rs-f266ea63039c87886f871b068ef3dcdf851a1eca.tar.gz
nitrokey-rs-f266ea63039c87886f871b068ef3dcdf851a1eca.tar.bz2
Add the get_operation_status function to the Storage struct
This patch adds support for the NK_get_progress_bar_value function: It adds the OperationStatus enum that stores the return value of this command and adds the get_operation_status function to the Storage struct that executes the command.
Diffstat (limited to 'tests')
-rw-r--r--tests/device.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/device.rs b/tests/device.rs
index 070f3c1..7296372 100644
--- a/tests/device.rs
+++ b/tests/device.rs
@@ -9,8 +9,8 @@ use std::{thread, time};
use nitrokey::{
Authenticate, CommandError, CommunicationError, Config, ConfigureOtp, Device, DeviceInfo,
- Error, GenerateOtp, GetPasswordSafe, LibraryError, OtpMode, OtpSlotData, Storage, VolumeMode,
- DEFAULT_ADMIN_PIN, DEFAULT_USER_PIN,
+ Error, GenerateOtp, GetPasswordSafe, LibraryError, OperationStatus, OtpMode, OtpSlotData,
+ Storage, VolumeMode, DEFAULT_ADMIN_PIN, DEFAULT_USER_PIN,
};
use nitrokey_test::test as test_device;
@@ -648,6 +648,11 @@ fn get_sd_card_usage(device: Storage) {
}
#[test_device]
+fn get_operation_status(device: Storage) {
+ assert_ok!(OperationStatus::Idle, device.get_operation_status());
+}
+
+#[test_device]
fn export_firmware(device: Storage) {
let mut device = device;
assert_cmd_err!(