summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Schubert <bschubert15@bloomberg.net>2018-08-29 17:01:12 +0100
committerBenjamin Schubert <bschubert15@bloomberg.net>2018-08-29 17:58:51 +0100
commitcba9208f28378647d35956a225297b4c05fc698a (patch)
tree96a0b23fcb6543acca09e6f0dd95552a0ee7751d
parentc09852c9534554c923cf81fa14f4c18a81de3e73 (diff)
downloadbuildstream-cba9208f28378647d35956a225297b4c05fc698a.tar.gz
Add tests that not-found objects in cache are shown as SKIPPED
-rw-r--r--tests/frontend/pull.py19
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