mirror of
https://github.com/psy0rz/zfs_autobackup.git
synced 2025-04-11 22:40:01 +03:00
forgot a test
This commit is contained in:
parent
a2f85690a3
commit
2d42d1d1a5
@ -111,19 +111,19 @@ dir/testfile 0 2e863f1fcccd6642e4e28453eba10d2d3f74d798
|
||||
""", buf.getvalue())
|
||||
|
||||
|
||||
# def test_brokenpipe_cleanup_filesystem(self):
|
||||
# """test if stuff is cleaned up correctly, in debugging mode , when a pipe breaks. """
|
||||
#
|
||||
# prepare_zpools()
|
||||
# shelltest("cp tests/data/whole /test_source1/testfile")
|
||||
# shelltest("zfs snapshot test_source1@test")
|
||||
#
|
||||
# #breaks pipe when grep exists:
|
||||
# #important to use --debug, since that generates extra output which would be problematic if we didnt do correct SIGPIPE handling
|
||||
# shelltest("python -m zfs_autobackup.ZfsCheck test_source1@test --debug | grep -m1 'Hashing tree'")
|
||||
#
|
||||
# #should NOT be mounted anymore if cleanup went ok:
|
||||
# self.assertNotRegex(shelltest("mount"), "test_source1@test")
|
||||
def test_brokenpipe_cleanup_filesystem(self):
|
||||
"""test if stuff is cleaned up correctly, in debugging mode , when a pipe breaks. """
|
||||
|
||||
prepare_zpools()
|
||||
shelltest("cp tests/data/whole /test_source1/testfile")
|
||||
shelltest("zfs snapshot test_source1@test")
|
||||
|
||||
#breaks pipe when grep exists:
|
||||
#important to use --debug, since that generates extra output which would be problematic if we didnt do correct SIGPIPE handling
|
||||
shelltest("python -m zfs_autobackup.ZfsCheck test_source1@test --debug | grep -m1 'Hashing tree'")
|
||||
|
||||
#should NOT be mounted anymore if cleanup went ok:
|
||||
self.assertNotRegex(shelltest("mount"), "test_source1@test")
|
||||
|
||||
def test_brokenpipe_cleanup_volume(self):
|
||||
|
||||
|
@ -31,7 +31,7 @@ class ZfsCheck(CliBase):
|
||||
group.add_argument('--block-size', metavar="BYTES", default=4096, help="Read block-size, default %(default)s",
|
||||
type=int)
|
||||
group.add_argument('--count', metavar="COUNT", default=int((100 * (1024 ** 2)) / 4096),
|
||||
help="Generate a hash for every COUNT blocks. default %(default)s", type=int) # 100MiB
|
||||
help="Hash chunks of COUNT blocks. Default %(default)s . (Chunk size is BYTES * COUNT) ", type=int) # 100MiB
|
||||
|
||||
group.add_argument('--check', '-c', metavar="FILE", default=None,
|
||||
help="Read hashes from FILE and check them")
|
||||
|
Loading…
x
Reference in New Issue
Block a user