You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by gi...@apache.org on 2020/12/29 13:11:42 UTC

[buildstream] 01/03: tests: don't use sourcecache.export()

This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch abderrahim/source-cache
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 17825d790cffdbf236eae0801ffcc20fc04385e9
Author: Abderrahim Kitouni <ak...@gnome.org>
AuthorDate: Sun Jun 28 20:14:53 2020 +0100

    tests: don't use sourcecache.export()
---
 tests/sourcecache/fetch.py   | 4 ++--
 tests/sourcecache/push.py    | 4 ++--
 tests/sourcecache/staging.py | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/sourcecache/fetch.py b/tests/sourcecache/fetch.py
index 889de62..78185e5 100644
--- a/tests/sourcecache/fetch.py
+++ b/tests/sourcecache/fetch.py
@@ -96,7 +96,7 @@ def test_source_fetch(cli, tmpdir, datafiles):
 
             # get root digest of source
             sourcecache = context.sourcecache
-            digest = sourcecache.export(source)._get_digest()
+            digest = sourcecache._get_source(source._get_source_name()).files
 
             move_local_cas_to_remote_source_share(str(cache_dir), share.directory)
 
@@ -204,7 +204,7 @@ def test_source_pull_partial_fallback_fetch(cli, tmpdir, datafiles):
 
             # get root digest of source
             sourcecache = context.sourcecache
-            digest = sourcecache.export(source)._get_digest()
+            digest = sourcecache._get_source(source._get_source_name()).files
 
             move_local_cas_to_remote_source_share(str(cache_dir), share.directory)
 
diff --git a/tests/sourcecache/push.py b/tests/sourcecache/push.py
index 9f8663a..e4a12f8 100644
--- a/tests/sourcecache/push.py
+++ b/tests/sourcecache/push.py
@@ -101,7 +101,7 @@ def test_source_push_split(cli, tmpdir, datafiles):
             assert sourcecache.contains(source)
 
             # check that the remote CAS now has it
-            digest = sourcecache.export(source)._get_digest()
+            digest = sourcecache._get_source(source._get_source_name()).files
             assert storage.has_object(digest)
 
 
@@ -150,7 +150,7 @@ def test_source_push(cli, tmpdir, datafiles):
             assert sourcecache.contains(source)
 
             # check that the remote CAS now has it
-            digest = sourcecache.export(source)._get_digest()
+            digest = sourcecache._get_source(source._get_source_name()).files
             assert share.has_object(digest)
 
 
diff --git a/tests/sourcecache/staging.py b/tests/sourcecache/staging.py
index dbfc028..6ddef48 100644
--- a/tests/sourcecache/staging.py
+++ b/tests/sourcecache/staging.py
@@ -69,7 +69,7 @@ def test_source_staged(tmpdir, cli, datafiles):
         assert sourcecache.contains(source)
 
         # Extract the file and check it's the same as the one we imported
-        digest = sourcecache.export(source)._get_digest()
+        digest = sourcecache._get_source(source._get_source_name()).files
         extractdir = os.path.join(str(tmpdir), "extract")
         cas.checkout(extractdir, digest)
         dir1 = extractdir
@@ -102,7 +102,7 @@ def test_source_fetch(tmpdir, cli, datafiles):
         assert element._has_all_sources_in_source_cache()
 
         # check that the directory structures are identical
-        digest = sourcecache.export(source)._get_digest()
+        digest = sourcecache._get_source(source._get_source_name()).files
         extractdir = os.path.join(str(tmpdir), "extract")
         cas.checkout(extractdir, digest)
         dir1 = extractdir