Hopefully fix descriptors to compare in test
This commit is contained in:
parent
c1de1341ef
commit
fcc79ca95d
|
@ -77,7 +77,7 @@ class TestYamaCompact(TestCase):
|
||||||
seed = rng.randint(0, 9001)
|
seed = rng.randint(0, 9001)
|
||||||
print(f"seed: {seed}")
|
print(f"seed: {seed}")
|
||||||
rng.seed(seed)
|
rng.seed(seed)
|
||||||
later_expected_descriptor, _ = generate_random_dir(rng, src_path, 32)
|
initial_descriptor, _ = generate_random_dir(rng, src_path, 32)
|
||||||
|
|
||||||
subprocess.check_call(("datman", "backup-one", "srca", "main"), cwd=datman_path)
|
subprocess.check_call(("datman", "backup-one", "srca", "main"), cwd=datman_path)
|
||||||
orig_pointer_name = (
|
orig_pointer_name = (
|
||||||
|
@ -86,9 +86,8 @@ class TestYamaCompact(TestCase):
|
||||||
.split("\n")[0]
|
.split("\n")[0]
|
||||||
)
|
)
|
||||||
|
|
||||||
randomly_mutate_directory_in_descriptor(
|
randomly_mutate_directory_in_descriptor(initial_descriptor, src_path, rng)
|
||||||
later_expected_descriptor, src_path, rng
|
mutated_descriptor = scan_dir(src_path)
|
||||||
)
|
|
||||||
|
|
||||||
subprocess.check_call(("datman", "backup-one", "srca", "main"), cwd=datman_path)
|
subprocess.check_call(("datman", "backup-one", "srca", "main"), cwd=datman_path)
|
||||||
|
|
||||||
|
@ -171,8 +170,6 @@ class TestYamaCompact(TestCase):
|
||||||
key, value = next(iter(value.contents.items()))
|
key, value = next(iter(value.contents.items()))
|
||||||
self.assertEqual(key, "srca")
|
self.assertEqual(key, "srca")
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(value.ignore_metadata(), mutated_descriptor.ignore_metadata())
|
||||||
value.ignore_metadata(), later_expected_descriptor.ignore_metadata()
|
|
||||||
)
|
|
||||||
|
|
||||||
td.cleanup()
|
td.cleanup()
|
||||||
|
|
Loading…
Reference in New Issue