You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by no...@apache.org on 2020/12/29 12:38:12 UTC
[buildstream] 09/09: fixup! Make source-checkout fetch by default
This is an automated email from the ASF dual-hosted git repository.
not-in-ldap pushed a commit to branch gokcen/add_no_fetch_flag
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit c491d1125c55d19b55df6674231d0e360f5437ac
Author: Gökçen Nurlu <gn...@bloomberg.net>
AuthorDate: Fri Nov 23 17:53:34 2018 +0000
fixup! Make source-checkout fetch by default
---
tests/frontend/source_checkout.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tests/frontend/source_checkout.py b/tests/frontend/source_checkout.py
index 58dfdbd..af144f6 100644
--- a/tests/frontend/source_checkout.py
+++ b/tests/frontend/source_checkout.py
@@ -91,8 +91,8 @@ def test_source_checkout_except(datafiles, cli):
@pytest.mark.datafiles(DATA_DIR)
-@pytest.mark.parametrize('fetch', [(False), (True)])
-def test_source_checkout_fetch(datafiles, cli, fetch):
+@pytest.mark.parametrize('no_fetch', [(False), (True)])
+def test_source_checkout_fetch(datafiles, cli, no_fetch):
project = os.path.join(datafiles.dirname, datafiles.basename)
checkout = os.path.join(cli.directory, 'source-checkout')
target = 'remote-import-dev.bst'
@@ -104,18 +104,18 @@ def test_source_checkout_fetch(datafiles, cli, fetch):
'pony.h')
_yaml.dump(element, target_path)
- # Testing --fetch option requires that we do not have the sources
+ # Testing --no-fetch option requires that we do not have the sources
# cached already
assert cli.get_element_state(project, target) == 'fetch needed'
args = ['source-checkout']
- if fetch:
- args += ['--fetch']
+ if no_fetch:
+ args += ['--no-fetch']
args += [target, checkout]
result = cli.run(project=project, args=args)
- if fetch:
+ if no_fetch:
+ result.assert_main_error(ErrorDomain.PIPELINE, 'uncached-sources')
+ else:
result.assert_success()
assert os.path.exists(os.path.join(checkout, 'remote-import-dev', 'pony.h'))
- else:
- result.assert_main_error(ErrorDomain.PIPELINE, 'uncached-sources')