summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2018-02-14 16:57:45 +0000
committerJürg Billeter <j@bitron.ch>2018-02-26 15:04:17 +0000
commitba4919a4347f630571a5d5248b455e3e344f8a6d (patch)
tree9c874fec27204aa2b6d1dcf9130fd61528d40027
parenteae43fa4840b73293347f8bcbe4bf9e887ee7b1e (diff)
downloadbuildstream-ba4919a4347f630571a5d5248b455e3e344f8a6d.tar.gz
tests/frontend: Summarize the existing push and pull tests
These tests are too long to understand at a glance so a summary is needed of each.
-rw-r--r--tests/frontend/pull.py20
-rw-r--r--tests/frontend/push.py7
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py
index 94f4fe3e7..3ac63e68a 100644
--- a/tests/frontend/pull.py
+++ b/tests/frontend/pull.py
@@ -35,6 +35,11 @@ def assert_not_shared(cli, share, project, element_name):
.format(share.repo, element_name))
+# Tests that:
+#
+# * `bst build` pushes all build elements to configured 'push' cache
+# * `bst pull --deps all` downloads everything from cache after local deletion
+#
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_push_pull_all(cli, tmpdir, datafiles):
@@ -75,6 +80,11 @@ def test_push_pull_all(cli, tmpdir, datafiles):
assert cli.get_element_state(project, element_name) == 'cached'
+# Tests that:
+#
+# * `bst build` pushes all build elements ONLY to configured 'push' cache
+# * `bst show` finds artifacts that are available only in the secondary cache
+#
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_pull_secondary_cache(cli, tmpdir, datafiles):
@@ -107,6 +117,11 @@ def test_pull_secondary_cache(cli, tmpdir, datafiles):
assert cli.get_element_state(project, 'target.bst') == 'downloadable'
+# Tests that:
+#
+# * `bst push --remote` pushes to the given remote, not one from the config
+# * `bst pull --remote` pulls from the given remote
+#
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_push_pull_specific_remote(cli, tmpdir, datafiles):
@@ -156,6 +171,10 @@ def test_push_pull_specific_remote(cli, tmpdir, datafiles):
assert cli.get_element_state(project, 'target.bst') == 'cached'
+# Tests that:
+#
+# * In non-strict mode, dependency changes don't block artifact reuse
+#
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_push_pull_non_strict(cli, tmpdir, datafiles):
@@ -207,6 +226,7 @@ def test_push_pull_non_strict(cli, tmpdir, datafiles):
assert cli.get_element_state(project, 'target.bst') == 'cached'
+# Regression test for https://gitlab.com/BuildStream/buildstream/issues/202
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_push_pull_track_non_strict(cli, tmpdir, datafiles):
diff --git a/tests/frontend/push.py b/tests/frontend/push.py
index e4f39de65..338a854c9 100644
--- a/tests/frontend/push.py
+++ b/tests/frontend/push.py
@@ -36,6 +36,11 @@ def assert_not_shared(cli, share, project, element_name):
.format(share.repo, element_name))
+# Tests that:
+#
+# * `bst push` fails if there are no remotes configured for pushing
+# * `bst push` successfully pushes to any remote that is configured for pushing
+#
@pytest.mark.datafiles(DATA_DIR)
def test_push(cli, tmpdir, datafiles):
project = str(datafiles)
@@ -91,6 +96,8 @@ def test_push(cli, tmpdir, datafiles):
assert_shared(cli, share2, project, 'target.bst')
+# Tests that `bst push --deps all` pushes all dependencies of the given element.
+#
@pytest.mark.skipif(not IS_LINUX, reason='Only available on linux')
@pytest.mark.datafiles(DATA_DIR)
def test_push_all(cli, tmpdir, datafiles):