summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2018-11-15 15:25:44 +0100
committerJürg Billeter <j@bitron.ch>2018-11-19 20:54:30 +0100
commit8a0dc3a3256207e308bc9406a59ba076208869ab (patch)
tree11afd63c40ab520fe21a970314c8c56cf46799dd
parentba6c96e863ee7460f598d51869522a43be7d94c3 (diff)
downloadbuildstream-8a0dc3a3256207e308bc9406a59ba076208869ab.tar.gz
tests/testutils/artifactshare.py: Do not create a fake context
The fake context did not set the cache quota, triggering an error. With CASCache now separate from ArtifactCache, we can instantiate a CASCache without context.
-rw-r--r--tests/testutils/artifactshare.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/testutils/artifactshare.py b/tests/testutils/artifactshare.py
index 91dcb9bdb..5194e83cf 100644
--- a/tests/testutils/artifactshare.py
+++ b/tests/testutils/artifactshare.py
@@ -11,8 +11,8 @@ from multiprocessing import Process, Queue
import pytest_cov
from buildstream import _yaml
+from buildstream._artifactcache.cascache import CASCache
from buildstream._artifactcache.casserver import create_server
-from buildstream._context import Context
from buildstream._exceptions import CASError
from buildstream._protos.build.bazel.remote.execution.v2 import remote_execution_pb2
@@ -45,10 +45,7 @@ class ArtifactShare():
os.makedirs(self.repodir)
- context = Context()
- context.artifactdir = self.repodir
-
- self.cas = context.artifactcache.cas
+ self.cas = CASCache(self.repodir)
self.total_space = total_space
self.free_space = free_space