diff options
author | Jürg Billeter <j@bitron.ch> | 2019-02-27 11:05:45 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-03-01 05:11:55 +0000 |
commit | 537d842d7603ff65cdba5b5122b6b117362c710e (patch) | |
tree | 4dc9d0fa5eaee850afb054460626ee9c77182615 | |
parent | bb3ef3e3ef6271907027d111282f4f22dc4872bd (diff) | |
download | buildstream-537d842d7603ff65cdba5b5122b6b117362c710e.tar.gz |
tests/internals/storage_vdir_import.py: Use Directory._get_digest()
-rw-r--r-- | tests/internals/storage_vdir_import.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/internals/storage_vdir_import.py b/tests/internals/storage_vdir_import.py index ee346ea58..268bfb21f 100644 --- a/tests/internals/storage_vdir_import.py +++ b/tests/internals/storage_vdir_import.py @@ -113,7 +113,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 @@ -175,7 +176,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) @@ -213,7 +214,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, |