summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbderrahim Kitouni <akitouni@gnome.org>2020-07-10 10:32:32 +0100
committerJavier Jardón <jjardon@gnome.org>2020-07-30 10:22:53 +0000
commit4df98d3483d4babe809c1cb96cffc946dd1bc768 (patch)
tree89c52a0537dd34a2c736b87dcc175bf8f4b8ab90
parenteaf6f692869a3b3e0a92defdf604e662d6f770e7 (diff)
downloadbuildstream-abderrahim/artifact-cas.tar.gz
tests/testutils/artifactshare.py: use CASCache directlyabderrahim/artifact-cas
-rw-r--r--tests/testutils/artifactshare.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/testutils/artifactshare.py b/tests/testutils/artifactshare.py
index d929a7b91..03186862a 100644
--- a/tests/testutils/artifactshare.py
+++ b/tests/testutils/artifactshare.py
@@ -12,7 +12,7 @@ from multiprocessing import Process, Queue
from buildstream import _yaml
from buildstream._artifactcache.casserver import create_server
-from buildstream._context import Context
+from buildstream._artifactcache.cascache import CASCache
from buildstream._exceptions import CASError
@@ -48,11 +48,7 @@ class ArtifactShare():
os.makedirs(self.repodir)
- context = Context()
- context.artifactdir = self.repodir
- context.set_message_handler(self._message_handler)
-
- self.cas = context.artifactcache.cas
+ self.cas = CASCache(self.repodir)
self.total_space = total_space
self.free_space = free_space