show test output

This commit is contained in:
Edwin Eefting 2022-01-24 12:31:28 +01:00
parent 51d6731aa8
commit ddd82b935b

View File

@ -72,10 +72,12 @@ class TestZfsEncryption(unittest2.TestCase):
def runchecked(testname, command):
with self.subTest(testname):
with OutputIO() as buf:
result=None
with redirect_stderr(buf):
self.assertEqual(2, ZfsAutoverify(command.split(" ")).run())
result=ZfsAutoverify(command.split(" ")).run()
print(buf.getvalue())
self.assertEqual(2,result)
self.assertRegex(buf.getvalue(), "bad_filesystem: FAILED:")
self.assertRegex(buf.getvalue(), "bad_zvol: FAILED:")