diff options
Diffstat (limited to 'tests/frontend/pull.py')
-rw-r--r-- | tests/frontend/pull.py | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py index 3e726ffcb..fcfd447b7 100644 --- a/tests/frontend/pull.py +++ b/tests/frontend/pull.py @@ -60,54 +60,6 @@ def test_push_pull_all(cli, tmpdir, datafiles): # Tests that: # -# * `bst artifact push` (default targets) pushes all built elements to configured 'push' cache -# * `bst artifact pull` (default targets) downloads everything from cache after local deletion -# -@pytest.mark.datafiles(DATA_DIR + "_world") -def test_push_pull_default_targets(cli, tmpdir, datafiles): - project = str(datafiles) - - with create_artifact_share(os.path.join(str(tmpdir), "artifactshare")) as share: - - # First build the target elements - cli.configure({"artifacts": {"url": share.repo}}) - result = cli.run(project=project, args=["build"]) - result.assert_success() - assert cli.get_element_state(project, "target.bst") == "cached" - - # Push all elements - cli.configure({"artifacts": {"url": share.repo, "push": True}}) - result = cli.run(project=project, args=["artifact", "push"]) - result.assert_success() - - # Assert that everything is now cached in the remote. - all_elements = ["target.bst", "import-bin.bst", "import-dev.bst", "compose-all.bst"] - for element_name in all_elements: - assert_shared(cli, share, project, element_name) - - # Now we've pushed, delete the user's local artifact cache - # directory and try to redownload it from the share - # - casdir = os.path.join(cli.directory, "cas") - shutil.rmtree(casdir) - artifactdir = os.path.join(cli.directory, "artifacts") - shutil.rmtree(artifactdir) - - # Assert that nothing is cached locally anymore - states = cli.get_element_states(project, all_elements) - assert not any(states[e] == "cached" for e in all_elements) - - # Now try bst artifact pull - result = cli.run(project=project, args=["artifact", "pull"]) - result.assert_success() - - # And assert that it's again in the local cache, without having built - states = cli.get_element_states(project, all_elements) - assert not any(states[e] != "cached" for e in all_elements) - - -# Tests that: -# # * `bst build` pushes all build elements ONLY to configured 'push' cache # * `bst artifact pull` finds artifacts that are available only in the secondary cache # |