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 ddffddb621bddbca4bb8da37515ebbc8ace4a2ef Author: Tristan van Berkom <[email protected]> AuthorDate: Wed Jan 13 21:24:37 2021 +0900 tests/frontend/artifact_checkout.py: Test artifact checkout without project Test that we can operate on artifact refs without the need to have a project.conf present locally. --- tests/frontend/artifact_checkout.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/frontend/artifact_checkout.py b/tests/frontend/artifact_checkout.py index 18c63a2..1375bc3 100644 --- a/tests/frontend/artifact_checkout.py +++ b/tests/frontend/artifact_checkout.py @@ -32,7 +32,8 @@ DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project") ], ids=["none", "build", "run", "all"], ) -def test_checkout(cli, tmpdir, datafiles, deps, expect_exist, expect_noexist): [email protected]("with_project", [True, False], ids=["with-project", "without-project"]) +def test_checkout(cli, tmpdir, datafiles, deps, expect_exist, expect_noexist, with_project): project = str(datafiles) checkout = os.path.join(cli.directory, "checkout") @@ -56,7 +57,11 @@ def test_checkout(cli, tmpdir, datafiles, deps, expect_exist, expect_noexist): shutil.rmtree(str(os.path.join(str(tmpdir), "cache", "artifacts"))) assert cli.get_element_state(project, "target-import.bst") != "cached" - # Now checkout the artifacy + # 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")) + + # Now checkout the artifact result = cli.run( project=project, args=["artifact", "checkout", "--directory", checkout, "--pull", "--deps", deps, artifact_name],
