summaryrefslogtreecommitdiff
path: root/tests/sources/deb.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/deb.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/deb.py')
-rw-r--r--tests/sources/deb.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/sources/deb.py b/tests/sources/deb.py
index b5b031161..b925fc9e9 100644
--- a/tests/sources/deb.py
+++ b/tests/sources/deb.py
@@ -54,7 +54,7 @@ def test_fetch_bad_url(cli, tmpdir, datafiles):
# Try to fetch it
result = cli.run(project=project, args=[
- 'fetch', 'target.bst'
+ 'source', 'fetch', 'target.bst'
])
assert "FAILURE Try #" in result.stderr
result.assert_main_error(ErrorDomain.STREAM, None)
@@ -72,7 +72,7 @@ def test_fetch_bad_ref(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)
result.assert_task_error(ErrorDomain.SOURCE, None)
@@ -90,7 +90,7 @@ def test_track_warning(cli, tmpdir, datafiles):
# Track it
result = cli.run(project=project, args=[
- 'track', 'target.bst'
+ 'source', 'track', 'target.bst'
])
result.assert_success()
assert "Potential man-in-the-middle attack!" in result.stderr
@@ -108,9 +108,9 @@ def test_stage_default_basedir(cli, tmpdir, datafiles):
_copy_deb(DATA_DIR, tmpdir)
# Track, fetch, build, checkout
- result = cli.run(project=project, args=['track', 'target.bst'])
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
result.assert_success()
- 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()
@@ -136,9 +136,9 @@ def test_stage_no_basedir(cli, tmpdir, datafiles):
_copy_deb(DATA_DIR, tmpdir)
# Track, fetch, build, checkout
- result = cli.run(project=project, args=['track', 'target.bst'])
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
result.assert_success()
- 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()
@@ -164,9 +164,9 @@ def test_stage_explicit_basedir(cli, tmpdir, datafiles):
_copy_deb(DATA_DIR, tmpdir)
# Track, fetch, build, checkout
- result = cli.run(project=project, args=['track', 'target.bst'])
+ result = cli.run(project=project, args=['source', 'track', 'target.bst'])
result.assert_success()
- 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()