Working cycle, just needs tests
This commit is contained in:
parent
e0841aa24c
commit
0e908aa582
@ -1,3 +1,4 @@
|
|||||||
|
import subprocess
|
||||||
import time
|
import time
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from random import Random
|
from random import Random
|
||||||
@ -10,7 +11,7 @@ from helpers.yama_helpers import set_up_simple_yama
|
|||||||
|
|
||||||
|
|
||||||
class TestBackupAndExtract(TestCase):
|
class TestBackupAndExtract(TestCase):
|
||||||
def test_backup_one_full(self):
|
def test_backup_one_full_no_labelling(self):
|
||||||
td = TemporaryDirectory("test_backup_one_full")
|
td = TemporaryDirectory("test_backup_one_full")
|
||||||
tdpath = Path(td.name)
|
tdpath = Path(td.name)
|
||||||
|
|
||||||
@ -27,4 +28,11 @@ class TestBackupAndExtract(TestCase):
|
|||||||
rng.seed(seed)
|
rng.seed(seed)
|
||||||
generate_random_dir(rng, src_path, 64)
|
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)
|
@ -3,7 +3,7 @@ from pathlib import Path
|
|||||||
|
|
||||||
|
|
||||||
def get_hostname():
|
def get_hostname():
|
||||||
return subprocess.check_output("hostname").strip()
|
return subprocess.check_output("hostname").strip().decode()
|
||||||
|
|
||||||
|
|
||||||
def set_up_simple_datman(path: Path):
|
def set_up_simple_datman(path: Path):
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
@ -5,3 +6,4 @@ from pathlib import Path
|
|||||||
def set_up_simple_yama(path: Path):
|
def set_up_simple_yama(path: Path):
|
||||||
path.mkdir(exist_ok=True)
|
path.mkdir(exist_ok=True)
|
||||||
subprocess.check_call(("yama", "init"), cwd=path)
|
subprocess.check_call(("yama", "init"), cwd=path)
|
||||||
|
shutil.copyfile("../example_zstd.dict", path.joinpath("important_zstd.dict"))
|
Loading…
Reference in New Issue
Block a user