diff options
author | Jürg Billeter <j@bitron.ch> | 2019-02-27 11:05:45 +0100 |
---|---|---|
committer | Abderrahim Kitouni <akitouni@gnome.org> | 2020-08-26 12:47:05 +0100 |
commit | 1318fc235460bcb6a9333433a5fedf2ddafe5f53 (patch) | |
tree | 18429fe142316ab86b94072758f251d51e202fea | |
parent | 18b995a76950023e6d4fc635d6cd47b00513b7b6 (diff) | |
download | buildstream-1318fc235460bcb6a9333433a5fedf2ddafe5f53.tar.gz |
tests/internals/storage_vdir_import.py: Use Directory._get_digest()
-rw-r--r-- | tests/storage/virtual_directory_import.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/storage/virtual_directory_import.py b/tests/storage/virtual_directory_import.py index 3dfbfdecd..ff263c7af 100644 --- a/tests/storage/virtual_directory_import.py +++ b/tests/storage/virtual_directory_import.py @@ -111,7 +111,8 @@ def file_contents_are(path, contents): def create_new_casdir(root_number, cas_cache, tmpdir): d = CasBasedDirectory(cas_cache) d.import_files(os.path.join(tmpdir, "content", "root{}".format(root_number))) - assert d.ref.hash != empty_hash_ref + digest = d._get_digest() + assert digest.hash != empty_hash_ref return d @@ -173,7 +174,7 @@ def _import_test(tmpdir, original, overlay, generator_function, verify_contents= duplicate_cas = create_new_casdir(original, cas_cache, tmpdir) - assert duplicate_cas.ref.hash == d.ref.hash + assert duplicate_cas._get_digest().hash == d._get_digest().hash d2 = create_new_casdir(overlay, cas_cache, tmpdir) d.import_files(d2) @@ -211,7 +212,7 @@ def _import_test(tmpdir, original, overlay, generator_function, verify_contents= duplicate_cas.import_files(roundtrip_dir) - assert duplicate_cas.ref.hash == d.ref.hash + assert duplicate_cas._get_digest().hash == d._get_digest().hash # It's possible to parameterize on both original and overlay values, |