diff options
author | Gökçen Nurlu <gnurlu1@bloomberg.net> | 2018-11-23 17:53:34 +0000 |
---|---|---|
committer | Gökçen Nurlu <gnurlu1@bloomberg.net> | 2018-11-23 17:53:34 +0000 |
commit | c491d1125c55d19b55df6674231d0e360f5437ac (patch) | |
tree | 020529ddd6fcc3f163e4a8e6b41401893b166b67 | |
parent | af2bf4a7bb019d764e895bcb99ad5644aa69756b (diff) | |
download | buildstream-gokcen/add_no_fetch_flag.tar.gz |
fixup! Make source-checkout fetch by defaultgokcen/add_no_fetch_flag
-rw-r--r-- | tests/frontend/source_checkout.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/frontend/source_checkout.py b/tests/frontend/source_checkout.py index 58dfdbd42..af144f634 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') |