From 7cf265aa478e815e0e20839cc560b982b6ba3db5 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Tue, 7 May 2024 09:55:43 +0200 Subject: [PATCH 1/2] tests: Add a base class for stratis tests To avoid re-running all the test cases from StratisTestCase in StratisTestCaseClevis. --- tests/storage_tests/devices_test/stratis_test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/storage_tests/devices_test/stratis_test.py b/tests/storage_tests/devices_test/stratis_test.py index 147078e7f..5aaa12d4f 100644 --- a/tests/storage_tests/devices_test/stratis_test.py +++ b/tests/storage_tests/devices_test/stratis_test.py @@ -8,7 +8,7 @@ from blivet.devices.stratis import StratisFilesystemDevice, StratisClevisConfig -class StratisTestCase(StorageTestCase): +class StratisTestCaseBase(StorageTestCase): @classmethod def setUpClass(cls): @@ -42,6 +42,9 @@ def _clean_up(self): return super()._clean_up() + +class StratisTestCase(StratisTestCaseBase): + def test_stratis_basic(self): disk = self.storage.devicetree.get_device_by_path(self.vdevs[0]) self.assertIsNotNone(disk) @@ -209,7 +212,7 @@ def test_stratis_add_device(self): @unittest.skip("Requires TPM or Tang configuration") -class StratisTestCaseClevis(StratisTestCase): +class StratisTestCaseClevis(StratisTestCaseBase): # XXX: we don't have Tang server, this test will be always skipped # the test cases are kept here for manual testing From 2593087ba9188fb874b54b36c0d71f23f0bc3d1b Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Tue, 7 May 2024 13:09:24 +0200 Subject: [PATCH 2/2] misc: Add stratis-cli and stratisd to test dependencies --- misc/install-test-dependencies.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/install-test-dependencies.yml b/misc/install-test-dependencies.yml index 8e1d40450..4641194ef 100644 --- a/misc/install-test-dependencies.yml +++ b/misc/install-test-dependencies.yml @@ -55,6 +55,8 @@ - targetcli - iscsi-initiator-utils - gfs2-utils + - stratisd + - stratis-cli when: ansible_distribution == 'Fedora' and test_dependencies|bool ####### CentOS 8/9 @@ -105,6 +107,8 @@ - python3-pip - targetcli - iscsi-initiator-utils + - stratisd + - stratis-cli when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '8' and test_dependencies|bool - name: Install paramiko using pip (not available in EPEL yet) (CentOS 9)