diff options
author | Raoul Hidalgo Charman <raoul.hidalgocharman@codethink.co.uk> | 2019-04-05 11:09:01 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-05-15 10:18:26 +0000 |
commit | f2583c2aea2a29d88a00c1f791b2a64c8d925ed7 (patch) | |
tree | acf2caa06ae34e76f14765c40263976779fe98af /tests/artifactcache/pull.py | |
parent | 1d3f336641c08f1b047ac5d20c3577b94fc57a18 (diff) | |
download | buildstream-f2583c2aea2a29d88a00c1f791b2a64c8d925ed7.tar.gz |
artifactcache tests: change artifactcache variables
A few variables were naming artifactcache variables cas, which was
confusing. Changed this and comments to clarify this.
Diffstat (limited to 'tests/artifactcache/pull.py')
-rw-r--r-- | tests/artifactcache/pull.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/artifactcache/pull.py b/tests/artifactcache/pull.py index 96fdef812..40fed7637 100644 --- a/tests/artifactcache/pull.py +++ b/tests/artifactcache/pull.py @@ -140,18 +140,18 @@ def _test_pull(user_config_file, project_dir, cache_dir, project = Project(project_dir, context) project.ensure_fully_loaded() - # Create a local CAS cache handle - cas = context.artifactcache + # Create a local artifact cache handle + artifactcache = context.artifactcache # Load the target element element = project.load_elements([element_name])[0] # Manually setup the CAS remote - cas.setup_remotes(use_config=True) + artifactcache.setup_remotes(use_config=True) - if cas.has_push_remotes(plugin=element): + if artifactcache.has_push_remotes(plugin=element): # Push the element's artifact - if not cas.pull(element, element_key): + if not artifactcache.pull(element, element_key): queue.put("Pull operation failed") else: queue.put(None) @@ -203,7 +203,7 @@ def test_pull_tree(cli, tmpdir, datafiles): project = Project(project_dir, context) project.ensure_fully_loaded() artifactcache = context.artifactcache - cas = artifactcache.cas + cas = context.get_cascache() # Assert that the element's artifact is cached element = project.load_elements(['target.bst'])[0] @@ -278,9 +278,9 @@ def _test_push_tree(user_config_file, project_dir, artifact_digest, queue): project = Project(project_dir, context) project.ensure_fully_loaded() - # Create a local CAS cache handle + # Create a local artifact cache and cas handle artifactcache = context.artifactcache - cas = artifactcache.cas + cas = context.get_cascache() # Manually setup the CAS remote artifactcache.setup_remotes(use_config=True) @@ -313,15 +313,15 @@ def _test_pull_tree(user_config_file, project_dir, artifact_digest, queue): project = Project(project_dir, context) project.ensure_fully_loaded() - # Create a local CAS cache handle - cas = context.artifactcache + # Create a local artifact cache handle + artifactcache = context.artifactcache # Manually setup the CAS remote - cas.setup_remotes(use_config=True) + artifactcache.setup_remotes(use_config=True) - if cas.has_push_remotes(): + if artifactcache.has_push_remotes(): # Pull the artifact using the Tree object - directory_digest = cas.pull_tree(project, artifact_digest) + directory_digest = artifactcache.pull_tree(project, artifact_digest) queue.put((directory_digest.hash, directory_digest.size_bytes)) else: queue.put("No remote configured") |