forked from p15670423/monkey
Island: Add new locking test for RepositoryEncryptor
This commit is contained in:
parent
3c4883b304
commit
52f5e70812
|
@ -59,6 +59,20 @@ def test_existing_key_reused(encryptor, key_file):
|
|||
assert key_file_hash_1 == key_file_hash_2
|
||||
|
||||
|
||||
def test_existing_key_reused__lock(encryptor, key_file):
|
||||
assert not key_file.is_file()
|
||||
|
||||
encryptor.unlock(SECRET)
|
||||
key_file_hash_1 = get_file_sha256_hash(key_file)
|
||||
|
||||
encryptor.lock()
|
||||
|
||||
encryptor.unlock(SECRET)
|
||||
key_file_hash_2 = get_file_sha256_hash(key_file)
|
||||
|
||||
assert key_file_hash_1 == key_file_hash_2
|
||||
|
||||
|
||||
def test_unlock_os_error(encryptor, key_file):
|
||||
key_file.mkdir()
|
||||
|
||||
|
|
Loading…
Reference in New Issue