From da2020ffb760a2953507c9efae5dff57c98893ac Mon Sep 17 00:00:00 2001 From: John Baublitz Date: Mon, 15 Jul 2024 16:42:12 -0400 Subject: [PATCH] Allow test_encryption_simple_event to handle metadata V2 --- tests/client-dbus/tests/udev/test_udev.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/client-dbus/tests/udev/test_udev.py b/tests/client-dbus/tests/udev/test_udev.py index bcec8fd2db..a6978741e6 100644 --- a/tests/client-dbus/tests/udev/test_udev.py +++ b/tests/client-dbus/tests/udev/test_udev.py @@ -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, @@ -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] @@ -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: