aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-01-16 20:20:31 +0000
committerRobin Krahl <robin.krahl@ireas.org>2019-01-16 21:22:48 +0100
commitd72641832a6c8622cf6468987b5b0aa5bd4c1c39 (patch)
treefe78b07440553ef9bb8a5ff6493057e122e2c01e /tests
parent3a8669cea4aa4b32fee3336cb9be4ec66d3dc2c2 (diff)
downloadnitrokey-rs-d72641832a6c8622cf6468987b5b0aa5bd4c1c39.tar.gz
nitrokey-rs-d72641832a6c8622cf6468987b5b0aa5bd4c1c39.tar.bz2
Add delay between factory reset and building AES key in tests
There seems to be a bug in libnitrokey or the Nitrokey Storage firmware that causes problems when chaining factory reset and build_AES_keys without delay (upstream issue [0]). [0] https://github.com/Nitrokey/nitrokey-storage-firmware/issues/80
Diffstat (limited to 'tests')
-rw-r--r--tests/device.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/device.rs b/tests/device.rs
index 8efaace..849d2ff 100644
--- a/tests/device.rs
+++ b/tests/device.rs
@@ -462,6 +462,7 @@ fn get_production_info(device: Storage) {
#[test_device]
fn clear_new_sd_card_warning(device: Storage) {
assert_eq!(Ok(()), device.factory_reset(ADMIN_PASSWORD));
+ thread::sleep(time::Duration::from_secs(3));
assert_eq!(Ok(()), device.build_aes_key(ADMIN_PASSWORD));
// We have to perform an SD card operation to reset the new_sd_card_found field