summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2021-03-11 10:48:38 +0200
committerSimon McVittie <smcv@debian.org>2023-01-22 12:42:44 +0000
commit706936dea07d5b0d62f7636dc1802c802847eccd (patch)
treefc68b3a424cf1619f45a661ed5ada0dabc34d505
parentb2c142c0e87f1eba7faea9640a7bed9a130d5418 (diff)
tests: fix test_bmap_helpers on non-ZFS
One test failed when running with on a system that does not have ZFS. Origin: upstream, 3.7, commit:3a84ba28364c5686b6b1ce0742a4b70d8f8b37c3 Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Gbp-Pq: Name tests-fix-test_bmap_helpers-on-non-ZFS.patch
-rw-r--r--tests/test_bmap_helpers.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_bmap_helpers.py b/tests/test_bmap_helpers.py
index 8516164..1617957 100644
--- a/tests/test_bmap_helpers.py
+++ b/tests/test_bmap_helpers.py
@@ -102,7 +102,8 @@ class TestBmapHelpers(unittest.TestCase):
mock_open.side_effect = IOError
with self.assertRaises(BmapHelpers.Error):
- BmapHelpers.is_zfs_configuration_compatible()
+ if not BmapHelpers.is_zfs_configuration_compatible():
+ raise BmapHelpers.Error
def test_is_zfs_configuration_compatible_notinstalled(self):
"""Check compatiblilty check passes when zfs not installed"""