mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-11 09:59:19 -04:00
Merge pull request #8826 from ThomasWaldmann/repo-compress-tests
tests: add repo-compress --stats test
This commit is contained in:
commit
4d43e136a6
1 changed files with 13 additions and 0 deletions
|
|
@ -69,3 +69,16 @@ def test_repo_compress(archiver):
|
|||
cname, ctype, clevel, olevel = ZLIB.name, ZLIB.ID, 2, 111
|
||||
cmd(archiver, "repo-compress", "-C", f"obfuscate,{olevel},auto,{cname},{clevel}")
|
||||
check_compression(ctype, clevel, olevel)
|
||||
|
||||
|
||||
def test_repo_compress_stats(archiver):
|
||||
create_regular_file(archiver.input_path, "file1", size=1024 * 10)
|
||||
create_regular_file(archiver.input_path, "file2", contents=os.urandom(1024 * 10))
|
||||
cmd(archiver, "repo-create", RK_ENCRYPTION)
|
||||
|
||||
cname, clevel = ZLIB.name, 3
|
||||
cmd(archiver, "create", "test", "input", "-C", f"{cname},{clevel}")
|
||||
|
||||
cname, clevel = ZSTD.name, 1 # change compressor (and level)
|
||||
output = cmd(archiver, "repo-compress", "-C", f"{cname},{clevel}", "--stats")
|
||||
assert "Recompression stats:" in output
|
||||
|
|
|
|||
Loading…
Reference in a new issue