summaryrefslogtreecommitdiff
path: root/tests/artifactcache
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-07-02 17:14:44 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-07-05 09:44:45 +0000
commitcfbab5fe76f8011bc8b6b895b2d3bfff4ea167b3 (patch)
tree51abb49a04c9797e7def9c8929e8f427037c61ed /tests/artifactcache
parentb60fffebf563edfe258cbb893754197af1ac5a0b (diff)
downloadbuildstream-cfbab5fe76f8011bc8b6b895b2d3bfff4ea167b3.tar.gz
Refactor, use context.messenger directly
Instead of having methods in Context forward calls on to the Messenger, have folks call the Messenger directly. Remove the forwarding methods in Context.
Diffstat (limited to 'tests/artifactcache')
-rw-r--r--tests/artifactcache/pull.py10
-rw-r--r--tests/artifactcache/push.py6
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/artifactcache/pull.py b/tests/artifactcache/pull.py
index b42af9e6e..a4ea74633 100644
--- a/tests/artifactcache/pull.py
+++ b/tests/artifactcache/pull.py
@@ -95,7 +95,7 @@ def test_pull(cli, tmpdir, datafiles):
# Fake minimal context
context = Context()
context.load(config=user_config_file)
- context.set_message_handler(message_handler)
+ context.messenger.set_message_handler(message_handler)
# Load the project
project = Project(project_dir, context)
@@ -136,7 +136,7 @@ def _test_pull(user_config_file, project_dir, cache_dir,
context.cachedir = cache_dir
context.casdir = os.path.join(cache_dir, 'cas')
context.tmpdir = os.path.join(cache_dir, 'tmp')
- context.set_message_handler(message_handler)
+ context.messenger.set_message_handler(message_handler)
# Load the project manually
project = Project(project_dir, context)
@@ -198,7 +198,7 @@ def test_pull_tree(cli, tmpdir, datafiles):
# Fake minimal context
context = Context()
context.load(config=user_config_file)
- context.set_message_handler(message_handler)
+ context.messenger.set_message_handler(message_handler)
# Load the project and CAS cache
project = Project(project_dir, context)
@@ -273,7 +273,7 @@ def _test_push_tree(user_config_file, project_dir, artifact_digest, queue):
# Fake minimal context
context = Context()
context.load(config=user_config_file)
- context.set_message_handler(message_handler)
+ context.messenger.set_message_handler(message_handler)
# Load the project manually
project = Project(project_dir, context)
@@ -308,7 +308,7 @@ def _test_pull_tree(user_config_file, project_dir, artifact_digest, queue):
# Fake minimal context
context = Context()
context.load(config=user_config_file)
- context.set_message_handler(message_handler)
+ context.messenger.set_message_handler(message_handler)
# Load the project manually
project = Project(project_dir, context)
diff --git a/tests/artifactcache/push.py b/tests/artifactcache/push.py
index 996091fca..a54c1df09 100644
--- a/tests/artifactcache/push.py
+++ b/tests/artifactcache/push.py
@@ -71,7 +71,7 @@ def test_push(cli, tmpdir, datafiles):
# Fake minimal context
context = Context()
context.load(config=user_config_file)
- context.set_message_handler(message_handler)
+ context.messenger.set_message_handler(message_handler)
# Load the project manually
project = Project(project_dir, context)
@@ -108,7 +108,7 @@ def _test_push(user_config_file, project_dir, element_name, queue):
# Fake minimal context
context = Context()
context.load(config=user_config_file)
- context.set_message_handler(message_handler)
+ context.messenger.set_message_handler(message_handler)
# Load the project manually
project = Project(project_dir, context)
@@ -194,7 +194,7 @@ def _test_push_message(user_config_file, project_dir, queue):
# Fake minimal context
context = Context()
context.load(config=user_config_file)
- context.set_message_handler(message_handler)
+ context.messenger.set_message_handler(message_handler)
# Load the project manually
project = Project(project_dir, context)