formatting

This commit is contained in:
Edwin Eefting 2021-02-06 13:58:40 +01:00
parent ce05e1ba4c
commit 6fefadf884

View File

@ -1,4 +1,3 @@
from basetest import *
@ -29,7 +28,6 @@ class TestZfsNode(unittest2.TestCase):
r = shelltest("zfs umount test_target1")
r = shelltest("zfs mount test_target1")
# resume initial backup
def test_initial_resume(self):
@ -51,7 +49,6 @@ class TestZfsNode(unittest2.TestCase):
else:
self.assertIn(": resuming", buf.getvalue())
# should resume and succeed
with OutputIO() as buf:
with redirect_stdout(buf):
@ -80,7 +77,6 @@ test_target1/test_source2/fs2/sub
test_target1/test_source2/fs2/sub@test-20101111000000
""")
# resume incremental backup
def test_incremental_resume(self):
@ -135,7 +131,6 @@ test_target1/test_source2/fs2/sub
test_target1/test_source2/fs2/sub@test-20101111000000
""")
# generate an invalid resume token, and verify if its aborted automaticly
def test_initial_resumeabort(self):
@ -174,7 +169,6 @@ test_target1/test_source2/fs2/sub
test_target1/test_source2/fs2/sub@test-20101111000000
""")
# generate an invalid resume token, and verify if its aborted automaticly
def test_incremental_resumeabort(self):
@ -215,7 +209,6 @@ test_target1/test_source2/fs2/sub
test_target1/test_source2/fs2/sub@test-20101111000000
""")
# create a resume situation, where the other side doesnt want the snapshot anymore ( should abort resume )
def test_abort_unwanted_resume(self):
@ -233,7 +226,8 @@ test_target1/test_source2/fs2/sub@test-20101111000000
with redirect_stdout(buf):
# incremental, doesnt want previous anymore
with patch('time.strftime', return_value="20101111000002"):
self.assertFalse(ZfsAutobackup("test test_target1 --verbose --keep-target=0 --debug --allow-empty".split(" ")).run())
self.assertFalse(ZfsAutobackup(
"test test_target1 --verbose --keep-target=0 --debug --allow-empty".split(" ")).run())
print(buf.getvalue())
@ -253,7 +247,6 @@ test_target1/test_source2/fs2/sub
test_target1/test_source2/fs2/sub@test-20101111000002
""")
def test_missing_common(self):
with patch('time.strftime', return_value="20101111000000"):
@ -266,10 +259,8 @@ test_target1/test_source2/fs2/sub@test-20101111000002
with patch('time.strftime', return_value="20101111000001"):
self.assertTrue(ZfsAutobackup("test test_target1 --verbose --allow-empty".split(" ")).run())
############# TODO:
def test_ignoretransfererrors(self):
self.skipTest("todo: create some kind of situation where zfs recv exits with an error but transfer is still ok (happens in practice with acltype)")
self.skipTest(
"todo: create some kind of situation where zfs recv exits with an error but transfer is still ok (happens in practice with acltype)")