diff options
author | Jürg Billeter <j@bitron.ch> | 2018-09-26 10:19:30 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2018-09-27 10:19:12 +0100 |
commit | fe82c9c2c539a2e072c94bbbebf7091dad518ae9 (patch) | |
tree | c443d272a13fcc10227bc751ee38d8e5ccfb8db7 | |
parent | ed878cb64ebbc28c7686eba8a1db572549d14c89 (diff) | |
download | buildstream-fe82c9c2c539a2e072c94bbbebf7091dad518ae9.tar.gz |
tests/artifactcache/push.py: Use Context for artifact cache creation
-rw-r--r-- | tests/artifactcache/push.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/artifactcache/push.py b/tests/artifactcache/push.py index faf6a6980..c95aac3ef 100644 --- a/tests/artifactcache/push.py +++ b/tests/artifactcache/push.py @@ -6,7 +6,6 @@ import pytest from pluginbase import PluginBase 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 @@ -67,7 +66,7 @@ def test_push(cli, tmpdir, datafiles): project.ensure_fully_loaded() # Create a local CAS cache handle - cas = CASCache(context) + cas = context.artifactcache # Assert that the element's artifact is cached element = project.load_elements(['target.bst'], cas)[0] @@ -109,7 +108,7 @@ def _test_push(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] @@ -166,7 +165,7 @@ def test_push_directory(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] @@ -217,7 +216,7 @@ def _test_push_directory(user_config_file, project_dir, artifact_dir, artifact_d 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) @@ -292,7 +291,7 @@ def _test_push_message(user_config_file, project_dir, artifact_dir, queue): 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) |