aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2020-01-11 20:13:22 +0100
committerRobin Krahl <robin.krahl@ireas.org>2020-01-11 20:26:40 +0100
commit6142752da1563c1ab873dc7069aeec72522cca99 (patch)
treebb6fe9eca8cbd5e32d4b133b57d90466c4bc9b8e /tests
parentdbee55efa41496c8a683bfab96163facc93d6639 (diff)
downloadnitrokey-rs-6142752da1563c1ab873dc7069aeec72522cca99.tar.gz
nitrokey-rs-6142752da1563c1ab873dc7069aeec72522cca99.tar.bz2
Rename Status::get_status to get_storage_status
In the last patch, we added the get_status function to the Device trait. This patch renames the Storage::get_status function to get_storage_status to resolve the name clash – though allowed by the compiler, it is rather confusing for the end user.
Diffstat (limited to 'tests')
-rw-r--r--tests/device.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/device.rs b/tests/device.rs
index 92b79bd..f2a7031 100644
--- a/tests/device.rs
+++ b/tests/device.rs
@@ -564,7 +564,7 @@ fn set_encrypted_volume_mode(device: Storage) {
#[test_device]
fn set_unencrypted_volume_mode(device: Storage) {
fn assert_mode(device: &Storage, mode: VolumeMode) {
- let status = unwrap_ok!(device.get_status());
+ let status = unwrap_ok!(device.get_storage_status());
assert_eq!(
status.unencrypted_volume.read_only,
mode == VolumeMode::ReadOnly
@@ -595,7 +595,7 @@ fn set_unencrypted_volume_mode(device: Storage) {
#[test_device]
fn get_storage_status(device: Storage) {
- let status = unwrap_ok!(device.get_status());
+ let status = unwrap_ok!(device.get_storage_status());
assert!(status.serial_number_sd_card > 0);
assert!(status.serial_number_smart_card > 0);
}
@@ -615,7 +615,7 @@ fn get_production_info(device: Storage) {
assert!(info.sd_card.oem != 0);
assert!(info.sd_card.manufacturer != 0);
- let status = unwrap_ok!(device.get_status());
+ let status = unwrap_ok!(device.get_storage_status());
assert_eq!(status.firmware_version, info.firmware_version);
assert_eq!(status.serial_number_sd_card, info.sd_card.serial_number);
}
@@ -630,12 +630,12 @@ fn clear_new_sd_card_warning(device: Storage) {
// We have to perform an SD card operation to reset the new_sd_card_found field
assert_ok!((), device.lock());
- let status = unwrap_ok!(device.get_status());
+ let status = unwrap_ok!(device.get_storage_status());
assert!(status.new_sd_card_found);
assert_ok!((), device.clear_new_sd_card_warning(DEFAULT_ADMIN_PIN));
- let status = unwrap_ok!(device.get_status());
+ let status = unwrap_ok!(device.get_storage_status());
assert!(!status.new_sd_card_found);
}