aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-01-16 23:08:56 +0000
committerRobin Krahl <robin.krahl@ireas.org>2019-01-17 00:28:49 +0100
commitd18cb04ff4d201fe4532cedd22b9753e08385a7f (patch)
treef27cb835aa9849346769964883ebd05e4538b6d3 /tests
parent1fbb528641e44e902e86405defef1c26c78ee79b (diff)
downloadnitrokey-rs-d18cb04ff4d201fe4532cedd22b9753e08385a7f.tar.gz
nitrokey-rs-d18cb04ff4d201fe4532cedd22b9753e08385a7f.tar.bz2
Introduce the FirmwareVersion struct
The FirmwareVersion struct stores the major and minor firmware version of a Nitrokey device. We refactor the StorageProductionInfo and StorageStatus structs to use this new struct.
Diffstat (limited to 'tests')
-rw-r--r--tests/device.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/device.rs b/tests/device.rs
index 849d2ff..abede67 100644
--- a/tests/device.rs
+++ b/tests/device.rs
@@ -441,8 +441,8 @@ fn get_storage_status(device: Storage) {
#[test_device]
fn get_production_info(device: Storage) {
let info = device.get_production_info().unwrap();
- assert_eq!(0, info.firmware_version_major);
- assert!(info.firmware_version_minor != 0);
+ assert_eq!(0, info.firmware_version.major);
+ assert!(info.firmware_version.minor != 0);
assert!(info.serial_number_cpu != 0);
assert!(info.sd_card.serial_number != 0);
assert!(info.sd_card.size > 0);
@@ -454,8 +454,7 @@ fn get_production_info(device: Storage) {
assert!(info.sd_card.manufacturer != 0);
let status = device.get_status().unwrap();
- assert_eq!(status.firmware_version_major, info.firmware_version_major);
- assert_eq!(status.firmware_version_minor, info.firmware_version_minor);
+ assert_eq!(status.firmware_version, info.firmware_version);
assert_eq!(status.serial_number_sd_card, info.sd_card.serial_number);
}