Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Add a base class for stratis tests #1233

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions misc/install-test-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
- targetcli
- iscsi-initiator-utils
- gfs2-utils
- stratisd
- stratis-cli
when: ansible_distribution == 'Fedora' and test_dependencies|bool

####### CentOS 8/9
Expand Down Expand Up @@ -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)
Expand Down
7 changes: 5 additions & 2 deletions tests/storage_tests/devices_test/stratis_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from blivet.devices.stratis import StratisFilesystemDevice, StratisClevisConfig


class StratisTestCase(StorageTestCase):
class StratisTestCaseBase(StorageTestCase):

@classmethod
def setUpClass(cls):
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
Loading