diff --git a/test_externalfailures.py b/test_externalfailures.py new file mode 100644 index 0000000..c39d0f1 --- /dev/null +++ b/test_externalfailures.py @@ -0,0 +1 @@ +# ignore-transfer error diff --git a/test_zfsautobackup.py b/test_zfsautobackup.py index 7bd3e98..fb77897 100644 --- a/test_zfsautobackup.py +++ b/test_zfsautobackup.py @@ -328,6 +328,11 @@ test_target1/fs2/sub@test-20101111000000 def test_clearrefres(self): + #on zfs utils 0.6.x this isnt supported, skip for now: + r=shelltest("zfs recv -x bla test; echo $?") + if r=="\n2\n": + pass + r=shelltest("zfs set refreservation=1M test_source1/fs1") with patch('time.strftime', return_value="20101111000000"): @@ -362,6 +367,12 @@ test_target1/test_source2/fs2/sub@test-20101111000000 refreservation - def test_clearmount(self): + #on zfs utils 0.6.x this isnt supported, skip for now: + r=shelltest("zfs recv -o bla=1 test; echo $?") + if r=="\n2\n": + pass + + with patch('time.strftime', return_value="20101111000000"): self.assertFalse(ZfsAutobackup("test test_target1 --verbose --clear-mountpoint".split(" ")).run()) @@ -394,6 +405,7 @@ test_target1/test_source2/fs2/sub@test-20101111000000 canmount - - def test_rollback(self): + #initial backup with patch('time.strftime', return_value="20101111000000"): self.assertFalse(ZfsAutobackup("test test_target1 --verbose".split(" ")).run()) @@ -410,3 +422,4 @@ test_target1/test_source2/fs2/sub@test-20101111000000 canmount - - self.assertFalse(ZfsAutobackup("test test_target1 --verbose --allow-empty --rollback".split(" ")).run()) +