diff --git a/testsuite/datmantests/test_backup_and_extract.py b/testsuite/datmantests/test_backup_and_extract.py index 448fd7b..78b1472 100644 --- a/testsuite/datmantests/test_backup_and_extract.py +++ b/testsuite/datmantests/test_backup_and_extract.py @@ -1,3 +1,4 @@ +import subprocess import time from pathlib import Path from random import Random @@ -10,7 +11,7 @@ from helpers.yama_helpers import set_up_simple_yama class TestBackupAndExtract(TestCase): - def test_backup_one_full(self): + def test_backup_one_full_no_labelling(self): td = TemporaryDirectory("test_backup_one_full") tdpath = Path(td.name) @@ -27,4 +28,11 @@ class TestBackupAndExtract(TestCase): rng.seed(seed) generate_random_dir(rng, src_path, 64) - time.sleep(600) + print("storing") + subprocess.check_call(("datman", "backup-one", "srca", "main"), cwd=datman_path) + + print("extracting") + dest_path = tdpath.joinpath("desta") + subprocess.check_call(("datman", "extract", "--skip-metadata", "--accept-partial", "main", "../desta"), cwd=datman_path) + + time.sleep(300) \ No newline at end of file diff --git a/testsuite/helpers/datman_helpers.py b/testsuite/helpers/datman_helpers.py index fbfb15f..4c4f3f3 100644 --- a/testsuite/helpers/datman_helpers.py +++ b/testsuite/helpers/datman_helpers.py @@ -3,7 +3,7 @@ from pathlib import Path def get_hostname(): - return subprocess.check_output("hostname").strip() + return subprocess.check_output("hostname").strip().decode() def set_up_simple_datman(path: Path): diff --git a/testsuite/helpers/yama_helpers.py b/testsuite/helpers/yama_helpers.py index 0e1bc19..80d314f 100644 --- a/testsuite/helpers/yama_helpers.py +++ b/testsuite/helpers/yama_helpers.py @@ -1,7 +1,9 @@ +import shutil import subprocess from pathlib import Path def set_up_simple_yama(path: Path): path.mkdir(exist_ok=True) - subprocess.check_call(("yama", "init"), cwd=path) \ No newline at end of file + subprocess.check_call(("yama", "init"), cwd=path) + shutil.copyfile("../example_zstd.dict", path.joinpath("important_zstd.dict")) \ No newline at end of file