aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-03-06 13:49:13 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2017-03-11 15:41:52 +0100
commitf7101225f26176f62ef3df48bd20d43521210987 (patch)
tree976970a6e8cd1d9881dffd193c4fcc02201ca285
parent097c9ecf42d2724a074ea9e0d317ed5f38b5ca37 (diff)
downloadlibnitrokey-f7101225f26176f62ef3df48bd20d43521210987.tar.gz
libnitrokey-f7101225f26176f62ef3df48bd20d43521210987.tar.bz2
Update encrypted volume test. Use random password.
Randomizing password to ensure correctness of setting up hidden volume in current iteration Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--unittest/test_storage.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/unittest/test_storage.py b/unittest/test_storage.py
index 9c01382..da7c9a3 100644
--- a/unittest/test_storage.py
+++ b/unittest/test_storage.py
@@ -58,10 +58,10 @@ def test_encrypted_volume_unlock_hidden(C):
assert C.NK_unlock_hidden_volume(hidden_volume_password) == DeviceErrorCode.STATUS_OK
-@pytest.mark.skip(reason='hangs device, to report')
-def test_encrypted_volume_setup_multiple_hidden(C):
- skip_if_device_version_lower_than({'S': 43})
- hidden_volume_password = 'hiddenpassword'
+def test_encrypted_volume_setup_multiple_hidden_lock(C):
+ import random
+ skip_if_device_version_lower_than({'S': 45}) #hangs device on lower version
+ hidden_volume_password = 'hiddenpassword' + str(random.randint(0,100))
p = lambda i: hidden_volume_password + str(i)
assert C.NK_lock_device() == DeviceErrorCode.STATUS_OK
assert C.NK_unlock_encrypted_volume(DefaultPasswords.USER) == DeviceErrorCode.STATUS_OK