summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaoul Hidalgo Charman <raoul.hidalgocharman@codethink.co.uk>2019-06-20 10:26:24 +0100
committerRaoul Hidalgo Charman <raoul.hidalgocharman@codethink.co.uk>2019-06-21 11:09:07 +0100
commitd97ccf47dc2e03f13dff853ccaa3a84a345cdda2 (patch)
treefefaad919feff9d72a64ef135ba29ed4ea5212d3
parent6dab5bbf0e261064232c10a4efd8160b605515a5 (diff)
downloadbuildstream-d97ccf47dc2e03f13dff853ccaa3a84a345cdda2.tar.gz
tests/partial: Add test to cover find_missing_blobs
Add test that ensures method is actually covered now and it works.
-rw-r--r--tests/remoteexecution/partial.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/remoteexecution/partial.py b/tests/remoteexecution/partial.py
index fd7b11cdb..a684bda18 100644
--- a/tests/remoteexecution/partial.py
+++ b/tests/remoteexecution/partial.py
@@ -8,6 +8,8 @@ from buildstream._exceptions import ErrorDomain
from buildstream.testing import cli_remote_execution as cli # pylint: disable=unused-import
from buildstream.testing.integration import assert_contains
+from tests.testutils.artifactshare import create_artifact_share
+
pytestmark = pytest.mark.remoteexecution
@@ -44,3 +46,26 @@ def test_build_dependency_partial_local_cas(cli, datafiles):
result = cli.run(project=project, args=['artifact', 'checkout', builddep_element_name,
'--directory', builddep_checkout])
result.assert_main_error(ErrorDomain.STREAM, 'uncached-checkout-attempt')
+
+
+@pytest.mark.datafiles(DATA_DIR)
+def test_build_partial_push(cli, tmpdir, datafiles):
+ project = str(datafiles)
+ share_dir = os.path.join(str(tmpdir), "artifactshare")
+ element_name = 'no-runtime-deps.bst'
+ builddep_element_name = 'autotools/amhello.bst'
+
+ with create_artifact_share(share_dir) as share:
+
+ services = cli.ensure_services()
+ assert set(services) == set(['action-cache', 'execution', 'storage'])
+
+ cli.config['artifacts'] = {
+ 'url': share.repo,
+ 'push': True,
+ }
+
+ res = cli.run(project=project, args=['build', element_name])
+ res.assert_success()
+
+ assert builddep_element_name in res.get_pushed_elements()