This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/optional-project
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit f3366e6932ef709c811ef4cc4d12e737c4df3a7f
Author: Tristan van Berkom <[email protected]>
AuthorDate: Thu Jan 14 16:21:31 2021 +0900

    tests/frontend/artifact_show.py: Test artifact show without a project
---
 tests/frontend/artifact_show.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/frontend/artifact_show.py b/tests/frontend/artifact_show.py
index 392a9e2..2a7131c 100644
--- a/tests/frontend/artifact_show.py
+++ b/tests/frontend/artifact_show.py
@@ -88,7 +88,8 @@ def test_artifact_show_element_missing_deps(cli, tmpdir, 
datafiles):
 
 # Test artifact show with artifact ref
 @pytest.mark.datafiles(DATA_DIR)
-def test_artifact_show_artifact_ref(cli, tmpdir, datafiles):
[email protected]("with_project", [True, False], ids=["with-project", 
"without-project"])
+def test_artifact_show_artifact_name(cli, tmpdir, datafiles, with_project):
     project = str(datafiles)
     element = "target.bst"
 
@@ -98,6 +99,10 @@ def test_artifact_show_artifact_ref(cli, tmpdir, datafiles):
     cache_key = cli.get_element_key(project, element)
     artifact_ref = "test/target/" + cache_key
 
+    # Delete the project.conf if we're going to try this without a project
+    if not with_project:
+        os.remove(os.path.join(project, "project.conf"))
+
     result = cli.run(project=project, args=["artifact", "show", artifact_ref])
     result.assert_success()
     assert "cached {}".format(artifact_ref) in result.output

Reply via email to