Skip to content

Commit d5dbcab

Browse files
committed
tests: Add check for saving passphrase with context not set
1 parent a82ab08 commit d5dbcab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/storage_tests/formats_test/luks_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,10 @@ def test_luks_save_passphrase(self):
304304
self.assertIsNotNone(disk)
305305
self.assertTrue(disk.format.has_key)
306306

307+
# remove passphrase and try to save it (should not fail)
308+
disk.format.passphrase = None
309+
blivet.static_data.luks_data.save_passphrase(disk)
310+
307311
def test_label_subsystem(self):
308312
disk = self.storage.devicetree.get_device_by_path(self.vdevs[0])
309313
self.assertIsNotNone(disk)

0 commit comments

Comments
 (0)