From d72641832a6c8622cf6468987b5b0aa5bd4c1c39 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Wed, 16 Jan 2019 20:20:31 +0000 Subject: 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 --- tests/device.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') 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 -- cgit v1.2.3