Remove create_artifact_share usages for remoteexecution tests
diff --git a/tests/remoteexecution/buildtree.py b/tests/remoteexecution/buildtree.py
index 57e25cd..3b86cb7 100644
--- a/tests/remoteexecution/buildtree.py
+++ b/tests/remoteexecution/buildtree.py
@@ -37,34 +37,33 @@
element_name = "build-shell/buildtree.bst"
share_path = os.path.join(str(tmpdir), "share")
- services = cli.ensure_services()
- assert set(services) == set(["action-cache", "execution", "storage"])
+ services = cli.ensure_services(artifacts=True)
+ assert set(services) == set(["action-cache", "execution", "storage", "artifact-cache"])
- with create_artifact_share(share_path) as share:
- cli.configure({"artifacts": {"url": share.repo, "push": True}, "cache": {"pull-buildtrees": False}})
+ cli.configure("cache": {"pull-buildtrees": False}})
- res = cli.run(project=project, args=["--cache-buildtrees", "always", "build", element_name])
- res.assert_success()
+ res = cli.run(project=project, args=["--cache-buildtrees", "always", "build", element_name])
+ res.assert_success()
- # remove local cache
- shutil.rmtree(os.path.join(str(tmpdir), "cache", "cas"))
- shutil.rmtree(os.path.join(str(tmpdir), "cache", "artifacts"))
+ # remove local cache
+ shutil.rmtree(os.path.join(str(tmpdir), "cache", "cas"))
+ shutil.rmtree(os.path.join(str(tmpdir), "cache", "artifacts"))
- # pull without buildtree
- res = cli.run(project=project, args=["artifact", "pull", "--deps", "all", element_name])
- res.assert_success()
+ # pull without buildtree
+ res = cli.run(project=project, args=["artifact", "pull", "--deps", "all", element_name])
+ res.assert_success()
- # check shell doesn't work
- res = cli.run(project=project, args=["shell", "--build", element_name, "--", "cat", "test"])
- res.assert_shell_error()
+ # check shell doesn't work
+ res = cli.run(project=project, args=["shell", "--build", element_name, "--", "cat", "test"])
+ res.assert_shell_error()
- # pull with buildtree
- res = cli.run(project=project, args=["--pull-buildtrees", "artifact", "pull", "--deps", "all", element_name])
- res.assert_success()
+ # pull with buildtree
+ res = cli.run(project=project, args=["--pull-buildtrees", "artifact", "pull", "--deps", "all", element_name])
+ res.assert_success()
- # check it works this time
- res = cli.run(
- project=project, args=["shell", "--build", element_name, "--use-buildtree", "always", "--", "cat", "test"]
- )
- res.assert_success()
- assert "Hi" in res.output
+ # check it works this time
+ res = cli.run(
+ project=project, args=["shell", "--build", element_name, "--use-buildtree", "always", "--", "cat", "test"]
+ )
+ res.assert_success()
+ assert "Hi" in res.output
diff --git a/tests/remoteexecution/partial.py b/tests/remoteexecution/partial.py
index ec5fabe..f283302 100644
--- a/tests/remoteexecution/partial.py
+++ b/tests/remoteexecution/partial.py
@@ -8,9 +8,6 @@
from buildstream.testing import cli_remote_execution as cli # pylint: disable=unused-import
from buildstream.testing.integration import assert_contains
-from tests.testutils.artifactshare import create_artifact_share
-
-
pytestmark = pytest.mark.remoteexecution
@@ -65,17 +62,10 @@
element_name = "no-runtime-deps.bst"
builddep_element_name = "autotools/amhello.bst"
- with create_artifact_share(share_dir) as share:
+ services = cli.ensure_services(artifacts=True)
+ assert set(services) == set(["action-cache", "execution", "storage", "artifact-cache"])
- services = cli.ensure_services()
- assert set(services) == set(["action-cache", "execution", "storage"])
+ res = cli.run(project=project, args=["build", element_name])
+ res.assert_success()
- cli.config["artifacts"] = {
- "url": share.repo,
- "push": True,
- }
-
- res = cli.run(project=project, args=["build", element_name])
- res.assert_success()
-
- assert builddep_element_name in res.get_pushed_elements()
+ assert builddep_element_name in res.get_pushed_elements()