diff options
author | bst-marge-bot <marge-bot@buildstream.build> | 2019-07-11 17:03:59 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-07-11 17:03:59 +0000 |
commit | 24426ebe31fc2ad297b352a1d332c7cf158ef5c2 (patch) | |
tree | 1c64a7ca6b5fd89528e55ac5ae1a8af7874ff0e0 /tests | |
parent | 199f080fac88fac1277541baec9def1c13afd048 (diff) | |
parent | af9530c66c7392abde791dea1ad52cc657d31004 (diff) | |
download | buildstream-24426ebe31fc2ad297b352a1d332c7cf158ef5c2.tar.gz |
Merge branch 'raoul/1043-disabling-blob-fetching' into 'master'
Configuration option for disabling blob fetching with RE
Closes #1043
See merge request BuildStream/buildstream!1402
Diffstat (limited to 'tests')
-rw-r--r-- | tests/remoteexecution/partial.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/remoteexecution/partial.py b/tests/remoteexecution/partial.py index a684bda18..bf5106f8d 100644 --- a/tests/remoteexecution/partial.py +++ b/tests/remoteexecution/partial.py @@ -23,7 +23,8 @@ DATA_DIR = os.path.join( # Test that `bst build` does not download file blobs of a build-only dependency # to the local cache. @pytest.mark.datafiles(DATA_DIR) -def test_build_dependency_partial_local_cas(cli, datafiles): +@pytest.mark.parametrize('pull_artifact_files', [True, False]) +def test_build_dependency_partial_local_cas(cli, datafiles, pull_artifact_files): project = str(datafiles) element_name = 'no-runtime-deps.bst' builddep_element_name = 'autotools/amhello.bst' @@ -33,16 +34,22 @@ def test_build_dependency_partial_local_cas(cli, datafiles): services = cli.ensure_services() assert set(services) == set(['action-cache', 'execution', 'storage']) + # configure pull blobs + cli.config['remote-execution']['pull-artifact-files'] = pull_artifact_files + result = cli.run(project=project, args=['build', element_name]) result.assert_success() - # Verify that the target element is available in local cache + # Verify artifact is pulled bar files when ensure artifact files is set result = cli.run(project=project, args=['artifact', 'checkout', element_name, '--directory', checkout]) - result.assert_success() - assert_contains(checkout, ['/test']) + if pull_artifact_files: + result.assert_success() + assert_contains(checkout, ['/test']) + else: + result.assert_main_error(ErrorDomain.STREAM, 'uncached-checkout-attempt') - # Verify that the build-only dependency is not (complete) in the local cache + # Verify build dependencies is pulled for ALL and BUILD result = cli.run(project=project, args=['artifact', 'checkout', builddep_element_name, '--directory', builddep_checkout]) result.assert_main_error(ErrorDomain.STREAM, 'uncached-checkout-attempt') |