summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2018-09-26 10:18:57 +0100
committerJürg Billeter <j@bitron.ch>2018-09-27 10:19:12 +0100
commited878cb64ebbc28c7686eba8a1db572549d14c89 (patch)
tree2a5bd0ff05f7807af2b703192612678e390ef7f0
parent3d88c5d43d32d37be29875d145c1c1291262b934 (diff)
downloadbuildstream-ed878cb64ebbc28c7686eba8a1db572549d14c89.tar.gz
tests/artifactcache/pull.py: Use Context for artifact cache creation
-rw-r--r--tests/artifactcache/pull.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/artifactcache/pull.py b/tests/artifactcache/pull.py
index 45560aabf..e76dc5ca7 100644
--- a/tests/artifactcache/pull.py
+++ b/tests/artifactcache/pull.py
@@ -6,7 +6,6 @@ import signal
import pytest
from buildstream import _yaml, _signals, utils
-from buildstream._artifactcache.cascache import CASCache
from buildstream._context import Context
from buildstream._project import Project
from buildstream._protos.build.bazel.remote.execution.v2 import remote_execution_pb2
@@ -88,7 +87,7 @@ def test_pull(cli, tmpdir, datafiles):
# Load the project and CAS cache
project = Project(project_dir, context)
project.ensure_fully_loaded()
- cas = CASCache(context)
+ cas = context.artifactcache
# Assert that the element's artifact is **not** cached
element = project.load_elements(['target.bst'], cas)[0]
@@ -130,7 +129,7 @@ def _test_pull(user_config_file, project_dir, artifact_dir,
project.ensure_fully_loaded()
# Create a local CAS cache handle
- cas = CASCache(context)
+ cas = context.artifactcache
# Load the target element
element = project.load_elements([element_name], cas)[0]
@@ -191,7 +190,7 @@ def test_pull_tree(cli, tmpdir, datafiles):
# Load the project and CAS cache
project = Project(project_dir, context)
project.ensure_fully_loaded()
- cas = CASCache(context)
+ cas = context.artifactcache
# Assert that the element's artifact is cached
element = project.load_elements(['target.bst'], cas)[0]
@@ -269,7 +268,7 @@ def _test_push_tree(user_config_file, project_dir, artifact_dir, artifact_digest
project.ensure_fully_loaded()
# Create a local CAS cache handle
- cas = CASCache(context)
+ cas = context.artifactcache
# Manually setup the CAS remote
cas.setup_remotes(use_config=True)
@@ -304,7 +303,7 @@ def _test_pull_tree(user_config_file, project_dir, artifact_dir, artifact_digest
project.ensure_fully_loaded()
# Create a local CAS cache handle
- cas = CASCache(context)
+ cas = context.artifactcache
# Manually setup the CAS remote
cas.setup_remotes(use_config=True)