From fe82c9c2c539a2e072c94bbbebf7091dad518ae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Billeter?= Date: Wed, 26 Sep 2018 10:19:30 +0100 Subject: tests/artifactcache/push.py: Use Context for artifact cache creation --- tests/artifactcache/push.py | 11 +++++------ 1 file 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) -- cgit v1.2.1