diff options
author | Benjamin Schubert <bschubert15@bloomberg.net> | 2018-08-29 17:01:12 +0100 |
---|---|---|
committer | Benjamin Schubert <bschubert15@bloomberg.net> | 2018-08-29 17:01:12 +0100 |
commit | 19e87afb1aa89fe68811c8b2970bc59e9f7d85e4 (patch) | |
tree | 3425d0a119be6e2be58d0b110e892f2c1d4b8427 | |
parent | c146dde587d9c094a4494c7012f9231edd20809c (diff) | |
download | buildstream-bschubert/log-missed-cache.tar.gz |
Add tests that not-found objects in cache are shown as SKIPPEDbschubert/log-missed-cache
-rw-r--r-- | tests/frontend/pull.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py index 9d2d5d1a2..ed9a9643e 100644 --- a/tests/frontend/pull.py +++ b/tests/frontend/pull.py @@ -338,3 +338,22 @@ def test_pull_missing_blob(cli, tmpdir, datafiles): # Assert that no artifacts were pulled assert len(result.get_pulled_elements()) == 0 + + +@pytest.mark.datafiles(DATA_DIR) +def test_pull_missing_notifies_user(caplog, cli, tmpdir, datafiles): + project = os.path.join(datafiles.dirname, datafiles.basename) + caplog.set_level(1) + + with create_artifact_share(os.path.join(str(tmpdir), 'artifactshare')) as share: + + cli.configure({ + 'artifacts': {'url': share.repo} + }) + result = cli.run(project=project, args=['build', 'target.bst']) + + result.assert_success() + assert not result.get_pulled_elements(), \ + "No elements should have been pulled since the cache was empty" + + assert "SKIPPED Remote ({}) does not have".format(share.repo) in result.stderr |