Skip to content

Commit

Permalink
Allow test_encryption_simple_event to handle metadata V2
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaublitz committed Jul 15, 2024
1 parent 5d1003c commit da2020f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/client-dbus/tests/udev/test_udev.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from ._dm import remove_stratis_setup
from ._loopback import UDEV_ADD_EVENT, UDEV_REMOVE_EVENT
from ._utils import (
_LEGACY_POOL,
CRYPTO_LUKS_FS_TYPE,
STRATIS_FS_TYPE,
OptionalKeyServiceContextManager,
Expand Down Expand Up @@ -329,7 +330,11 @@ def _simple_event_test(self, *, key_spec=None): # pylint: disable=too-many-loca
:type key_spec: (str, bytes) or NoneType
"""
num_devices = 3
udev_wait_type = STRATIS_FS_TYPE if key_spec is None else CRYPTO_LUKS_FS_TYPE
udev_wait_type = (
STRATIS_FS_TYPE
if key_spec is None or _LEGACY_POOL is None
else CRYPTO_LUKS_FS_TYPE
)
device_tokens = self._lb_mgr.create_devices(num_devices)
devnodes = self._lb_mgr.device_files(device_tokens)
key_spec = None if key_spec is None else [key_spec]
Expand Down Expand Up @@ -393,7 +398,7 @@ def _simple_event_test(self, *, key_spec=None): # pylint: disable=too-many-loca
},
)

if key_spec is None:
if key_spec is None or _LEGACY_POOL is None:
self.assertNotEqual(exit_code, StratisdErrors.OK)
self.assertEqual(changed, False)
else:
Expand Down

0 comments on commit da2020f

Please sign in to comment.