test/cli: check for repo command line argument
Check that specifying `--repo` multiple times results in the corresponding options dictionary (`opts`) entry, called `repo`.
This commit is contained in:
parent
f69ce030db
commit
58f6a60e15
1 changed files with 11 additions and 2 deletions
|
|
@ -76,14 +76,23 @@ class TestCliPlugin(PluginTest):
|
|||
f.close()
|
||||
|
||||
# check one successful invocation
|
||||
argv = ["name", "version", "distro", "target", "arch1"]
|
||||
|
||||
argv = [
|
||||
# the required positional arguments
|
||||
"name", "version", "distro", "target", "arch1",
|
||||
# optional keyword arguments
|
||||
"--repo", "https://first.repo",
|
||||
"--repo", "https://second.repo"
|
||||
]
|
||||
|
||||
expected_args = ["name", "version", "distro",
|
||||
['qcow2'], # the default image type
|
||||
"target",
|
||||
['arch1']]
|
||||
|
||||
expected_opts = {}
|
||||
expected_opts = {
|
||||
"repo": ["https://first.repo", "https://second.repo"]
|
||||
}
|
||||
|
||||
task_result = {"compose_id": "42", "build_id": 23}
|
||||
task_id = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue