Better strip path handling and collision checking. Now also supports stripping so much it ends up on a pool-target.

Fixes #102, #117
This commit is contained in:
Edwin Eefting
2022-02-23 17:47:50 +01:00
parent 07cb7cfad4
commit cab2f98bb8
3 changed files with 49 additions and 5 deletions

View File

@ -418,6 +418,13 @@ test_target1/fs2/sub
test_target1/fs2/sub@test-20101111000000
""")
def test_strippath_collision(self):
with self.assertRaisesRegexp(Exception,"collision"):
ZfsAutobackup("test test_target1 --verbose --strip-path=2 --no-progress --debug".split(" ")).run()
def test_strippath_toomuch(self):
with self.assertRaisesRegexp(Exception,"too much"):
ZfsAutobackup("test test_target1 --verbose --strip-path=3 --no-progress --debug".split(" ")).run()
def test_clearrefres(self):