test stuff

This commit is contained in:
Edwin Eefting 2020-05-17 17:11:52 +02:00
parent 138c913e58
commit 2143d22ae5
2 changed files with 8 additions and 4 deletions

@ -30,9 +30,9 @@ def prepare_zpools():
subprocess.check_call("modprobe brd rd_size=512000", shell=True)
#remove old stuff
subprocess.call("zpool destroy test_source1", shell=True)
subprocess.call("zpool destroy test_source2", shell=True)
subprocess.call("zpool destroy test_target1", shell=True)
subprocess.call("zpool destroy test_source1 2>/dev/null", shell=True)
subprocess.call("zpool destroy test_source2 2>/dev/null", shell=True)
subprocess.call("zpool destroy test_target1 2>/dev/null", shell=True)
#create pools
subprocess.check_call("zpool create test_source1 /dev/ram0", shell=True)

@ -8,4 +8,8 @@ class TestZfsAutobackup(unittest.TestCase):
return super().setUp()
def test_defaults(self):
self.assertFalse(ZfsAutobackup("test test_target1".split(" ")).run())
with self.subTest("defaults with full verbose and debug"):
self.assertFalse(ZfsAutobackup("test test_target1 --verbose --debug".split(" ")).run())
with self.subTest("bare defaults"):
self.assertFalse(ZfsAutobackup("test test_target1".split(" ")).run())