summaryrefslogtreecommitdiff
path: root/tests/sources/remote.py
diff options
context:
space:
mode:
authorChandan Singh <csingh43@bloomberg.net>2018-12-07 17:36:00 +0000
committerChandan Singh <csingh43@bloomberg.net>2018-12-14 19:34:20 +0000
commit629a6e52410f97edb386e59c48b7a7c28b3bf30a (patch)
tree43cb5c3c94db5a6bb014d5f61a49c0b571caf6f6 /tests/sources/remote.py
parent13eb7ed2f356e1f42a8d379e313d55c5d3875d34 (diff)
downloadbuildstream-629a6e52410f97edb386e59c48b7a7c28b3bf30a.tar.gz
Introduce new "source" command group
Following the message thread https://mail.gnome.org/archives/buildstream-list/2018-November/msg00106.html, implement a new command group called `source`. Move existing `track`, `fetch`, and the recently added `source-checkout` commands under this group. For `track` and `fetch`, this is a BREAKING change, as the old commands have been marked as obsolete. Using them will result in an error message that refers people to use the new versions, like `bst source fetch` instead of old `bst fetch`. `source-checkout` will now become `source checkout` (the dash has turned into a space), and is not a breaking change as it was added in the current development cycle. Note that the functionality to hide commands from help output was added only recently in Click, so the minimum version of Click that we now require is 7.0. Summary of changes: * _frontend/cli.py: Add `source` command group, mark previous versions as obsolete and hide them from the help output. * _frontend/complete.py: Fix completion for hidden commands. * setup.py: Bump Click minimum version to 7.0. * tests: Update to cope with the new command names. Fixes #814.
Diffstat (limited to 'tests/sources/remote.py')
-rw-r--r--tests/sources/remote.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/sources/remote.py b/tests/sources/remote.py
index a4a9d5965..6062c9cbc 100644
--- a/tests/sources/remote.py
+++ b/tests/sources/remote.py
@@ -50,7 +50,7 @@ def test_missing_file(cli, tmpdir, datafiles):
# Try to fetch it
result = cli.run(project=project, args=[
- 'fetch', 'target.bst'
+ 'source', 'fetch', 'target.bst'
])
result.assert_main_error(ErrorDomain.STREAM, None)
@@ -64,7 +64,7 @@ def test_path_in_filename(cli, tmpdir, datafiles):
# Try to fetch it
result = cli.run(project=project, args=[
- 'fetch', 'target.bst'
+ 'source', 'fetch', 'target.bst'
])
# The bst file has a / in the filename param
@@ -79,7 +79,7 @@ def test_simple_file_build(cli, tmpdir, datafiles):
# Try to fetch it
result = cli.run(project=project, args=[
- 'fetch', 'target.bst'
+ 'source', 'fetch', 'target.bst'
])
result.assert_success()
@@ -112,7 +112,7 @@ def test_simple_file_custom_name_build(cli, tmpdir, datafiles):
# Try to fetch it
result = cli.run(project=project, args=[
- 'fetch', 'target.bst'
+ 'source', 'fetch', 'target.bst'
])
result.assert_success()
@@ -141,7 +141,7 @@ def test_unique_key(cli, tmpdir, datafiles):
assert cli.get_element_state(project, 'target-custom-executable.bst') == "fetch needed"
# Try to fetch it
result = cli.run(project=project, args=[
- 'fetch', 'target.bst'
+ 'source', 'fetch', 'target.bst'
])
# We should download the file only once
@@ -198,7 +198,7 @@ def test_use_netrc(cli, datafiles, server_type, tmpdir):
server.start()
- result = cli.run(project=project, args=['fetch', 'target.bst'])
+ result = cli.run(project=project, args=['source', 'fetch', 'target.bst'])
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()