1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Date: Thu, 11 Mar 2021 10:48:38 +0200
Subject: 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>
---
tests/test_bmap_helpers.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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"""
|