fix tests
This commit is contained in:
parent
dd4a7edcfd
commit
502e7ed2ca
48 changed files with 131 additions and 134 deletions
|
|
@ -195,7 +195,7 @@ def handle_add_host(goptions, session, args):
|
|||
|
||||
def handle_edit_host(options, session, args):
|
||||
"[admin] Edit a host"
|
||||
usage = _("usage: %prog edit-host <hostname> ... [options]")
|
||||
usage = _("usage: %prog edit-host <hostname> [<hostname> ...] [options]")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
parser.add_option("--arches", help=_("Space or comma-separated list of supported architectures"))
|
||||
parser.add_option("--capacity", type="float", help=_("Capacity of this host"))
|
||||
|
|
@ -514,7 +514,7 @@ def handle_build(options, session, args):
|
|||
def handle_chain_build(options, session, args):
|
||||
# XXX - replace handle_build with this, once chain-building has gotten testing
|
||||
"[build] Build one or more packages from source"
|
||||
usage = _("usage: %prog chain-build [options] target URL [URL2 [:] URL3 [:] URL4 ...]")
|
||||
usage = _("usage: %prog chain-build [options] <target> <URL> [<URL> [:] <URL> [:] <URL> ...]")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
parser.add_option("--nowait", action="store_true",
|
||||
help=_("Don't wait on build"))
|
||||
|
|
@ -589,7 +589,7 @@ def handle_chain_build(options, session, args):
|
|||
def handle_maven_build(options, session, args):
|
||||
"[build] Build a Maven package from source"
|
||||
usage = _("usage: %prog maven-build [options] <target> <URL>")
|
||||
usage += _("\n %prog maven-build --ini=CONFIG... [options] target")
|
||||
usage += _("\n %prog maven-build --ini=CONFIG... [options] <target>")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
parser.add_option("--patches", action="store", metavar="URL",
|
||||
help=_("SCM URL of a directory containing patches to apply to the sources before building"))
|
||||
|
|
@ -5397,7 +5397,6 @@ def handle_spin_livecd(options, session, args):
|
|||
# Usage & option parsing.
|
||||
usage = _("usage: %prog spin-livecd [options] <name> <version> <target>" +
|
||||
" <arch> <kickstart-file>")
|
||||
usage += _("\n(Specify the --help global option for a list of other " +
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
parser.add_option("--wait", action="store_true",
|
||||
help=_("Wait on the livecd creation, even if running in the background"))
|
||||
|
|
@ -5443,7 +5442,6 @@ def handle_spin_livemedia(options, session, args):
|
|||
# Usage & option parsing.
|
||||
usage = _("usage: %prog spin-livemedia [options] <name> <version> <target>" +
|
||||
" <arch> <kickstart-file>")
|
||||
usage += _("\n(Specify the --help global option for a list of other " +
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
parser.add_option("--wait", action="store_true",
|
||||
help=_("Wait on the livemedia creation, even if running in the background"))
|
||||
|
|
@ -5504,7 +5502,6 @@ def handle_spin_appliance(options, session, args):
|
|||
# Usage & option parsing
|
||||
usage = _("usage: %prog spin-appliance [options] <name> <version> " +
|
||||
"<target> <arch> <kickstart-file>")
|
||||
usage += _("\n(Specify the --help global option for a list of other " +
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
parser.add_option("--wait", action="store_true",
|
||||
help=_("Wait on the appliance creation, even if running in the background"))
|
||||
|
|
@ -5554,8 +5551,7 @@ def handle_image_build_indirection(options, session, args):
|
|||
"""[build] Create a disk image using other disk images via the Indirection plugin"""
|
||||
usage = _("usage: %prog image-build-indirection [base_image] " +
|
||||
"[utility_image] [indirection_build_template]")
|
||||
usage += _("\n %prog image-build --config FILE")
|
||||
usage += _("\n\n(Specify the --help global option for a list of other " +
|
||||
usage += _("\n %prog image-build --config <FILE>\n")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
parser.add_option("--config",
|
||||
help=_("Use a configuration file to define image-build options " +
|
||||
|
|
@ -5698,8 +5694,7 @@ def handle_image_build(options, session, args):
|
|||
'liveimg-squashfs', 'tar-gz')
|
||||
usage = _("usage: %prog image-build [options] <name> <version> " +
|
||||
"<target> <install-tree-url> <arch> [<arch> ...]")
|
||||
usage += _("\n %prog image-build --config FILE")
|
||||
usage += _("\n\n(Specify the --help global option for a list of other " +
|
||||
usage += _("\n %prog image-build --config <FILE>\n")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
parser.add_option("--background", action="store_true",
|
||||
help=_("Run the image creation task at a lower priority"))
|
||||
|
|
@ -5963,7 +5958,6 @@ def handle_win_build(options, session, args):
|
|||
"""[build] Build a Windows package from source"""
|
||||
# Usage & option parsing
|
||||
usage = _("usage: %prog win-build [options] <target> <URL> <VM>")
|
||||
usage += _("\n(Specify the --help global option for a list of other " +
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
parser.add_option("--winspec", metavar="URL",
|
||||
help=_("SCM URL to retrieve the build descriptor from. " + \
|
||||
|
|
@ -6038,7 +6032,7 @@ def handle_win_build(options, session, args):
|
|||
|
||||
def handle_free_task(goptions, session, args):
|
||||
"[admin] Free a task"
|
||||
usage = _("usage: %prog free-task [options] <task-id> [<task-id> ...]")
|
||||
usage = _("usage: %prog free-task [options] <task_id> [<task_id> ...]")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
(options, args) = parser.parse_args(args)
|
||||
activate_session(session, goptions)
|
||||
|
|
@ -6047,16 +6041,16 @@ def handle_free_task(goptions, session, args):
|
|||
try:
|
||||
tlist.append(int(task_id))
|
||||
except ValueError:
|
||||
parser.error(_("task-id must be an integer"))
|
||||
parser.error(_("task_id must be an integer"))
|
||||
if not tlist:
|
||||
parser.error(_("please specify at least one task-id"))
|
||||
parser.error(_("please specify at least one task_id"))
|
||||
for task_id in tlist:
|
||||
session.freeTask(task_id)
|
||||
|
||||
|
||||
def handle_cancel(goptions, session, args):
|
||||
"[build] Cancel tasks and/or builds"
|
||||
usage = _("usage: %prog cancel [options] <task-id|build> [<task-id|build> ...]")
|
||||
usage = _("usage: %prog cancel [options] <task_id|build> [<task_id|build> ...]")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
parser.add_option("--justone", action="store_true", help=_("Do not cancel subtasks"))
|
||||
parser.add_option("--full", action="store_true", help=_("Full cancellation (admin only)"))
|
||||
|
|
@ -6093,7 +6087,7 @@ def handle_cancel(goptions, session, args):
|
|||
|
||||
def handle_set_task_priority(goptions, session, args):
|
||||
"[admin] Set task priority"
|
||||
usage = _("usage: %prog set-task-priority [options] --priority=<priority> <task-id> [<task-id> ...]")
|
||||
usage = _("usage: %prog set-task-priority [options] --priority=<priority> <task_id> [<task_id> ...]")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
parser.add_option("--priority", type="int", help=_("New priority"))
|
||||
parser.add_option("--recurse", action="store_true", default=False, help=_("Change priority of child tasks as well"))
|
||||
|
|
@ -6363,7 +6357,8 @@ def handle_tag_build(opts, session, args):
|
|||
|
||||
def handle_move_build(opts, session, args):
|
||||
"[bind] 'Move' one or more builds between tags"
|
||||
parser = OptionParser(usage=get_usage_str(uget_usage_str(usage))
|
||||
usage = _("usage: %prog move-build [options] <tag1> <tag2> <pkg> [<pkg> ...]")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
parser.add_option("--force", action="store_true", help=_("force operation"))
|
||||
parser.add_option("--nowait", action="store_true", help=_("do not wait on tasks"))
|
||||
parser.add_option("--all", action="store_true", help=_("move all instances of a package, <pkg>'s are package names"))
|
||||
|
|
@ -6620,7 +6615,7 @@ def anon_handle_download_logs(options, session, args):
|
|||
"[download] Download a logs for package"
|
||||
|
||||
FAIL_LOG = "task_failed.log"
|
||||
usage = _("usage: %prog download-logs [options] <task-id> [<task-id> ...]")
|
||||
usage = _("usage: %prog download-logs [options] <task_id> [<task_id> ...]")
|
||||
usage += _("\n %prog download-logs [options] --nvr <n-v-r> [<n-v-r> ...]")
|
||||
usage += _("\n(Specify the --help global option for a list of other help options)")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
|
|
@ -6960,7 +6955,7 @@ def handle_regen_repo(options, session, args):
|
|||
|
||||
def handle_dist_repo(options, session, args):
|
||||
"""Create a yum repo with distribution options"""
|
||||
usage = _("usage: %prog dist-repo [options] <tag> <keyID> [<keyID> ...]")
|
||||
usage = _("usage: %prog dist-repo [options] <tag> <key_id> [<key_id> ...]")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
parser.add_option('--allow-missing-signatures', action='store_true',
|
||||
default=False,
|
||||
|
|
@ -7115,6 +7110,7 @@ def anon_handle_search(options, session, args):
|
|||
|
||||
def handle_moshimoshi(options, session, args):
|
||||
"[misc] Introduce yourself"
|
||||
usage = _("usage: %prog moshimoshi [options]")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
(opts, args) = parser.parse_args(args)
|
||||
if len(args) != 0:
|
||||
|
|
@ -7253,7 +7249,7 @@ def handle_add_notification(goptions, session, args):
|
|||
|
||||
def handle_remove_notification(goptions, session, args):
|
||||
"[monitor] Remove user's notifications"
|
||||
usage = _("usage: %prog remove-notification [options] <ID> [<ID> ...]")
|
||||
usage = _("usage: %prog remove-notification [options] <notification_id> [<notification_id> ...]")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
(options, args) = parser.parse_args(args)
|
||||
|
||||
|
|
@ -7275,7 +7271,7 @@ def handle_remove_notification(goptions, session, args):
|
|||
|
||||
def handle_edit_notification(goptions, session, args):
|
||||
"[monitor] Edit user's notification"
|
||||
usage = _("usage: %prog edit-notification [options] <ID>")
|
||||
usage = _("usage: %prog edit-notification [options] <notification_id>")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
parser.add_option("--package",
|
||||
help=_("Notifications for this package, '*' for all"))
|
||||
|
|
@ -7383,7 +7379,7 @@ def handle_block_notification(goptions, session, args):
|
|||
|
||||
def handle_unblock_notification(goptions, session, args):
|
||||
"[monitor] Unblock user's notification"
|
||||
usage = _("usage: %prog unblock-notification [options] <ID> [<ID> ...]")
|
||||
usage = _("usage: %prog unblock-notification [options] <notification_id> [<notification_id> ...]")
|
||||
parser = OptionParser(usage=get_usage_str(usage))
|
||||
(options, args) = parser.parse_args(args)
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class TestAddGroupPkg(utils.CliTestCase):
|
|||
self.options = mock.MagicMock()
|
||||
self.activate_session = mock.patch('koji_cli.commands.activate_session').start()
|
||||
|
||||
self.error_format = """Usage: %s add-group-pkg [options] <tag> <group> <pkg> [<pkg>...]
|
||||
self.error_format = """Usage: %s add-group-pkg [options] <tag> <group> <pkg> [<pkg> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -54,7 +54,7 @@ class TestAddGroupPkg(utils.CliTestCase):
|
|||
def test_handle_add_group_pkg_help(self):
|
||||
self.assert_help(
|
||||
handle_add_group_pkg,
|
||||
"""Usage: %s add-group-pkg [options] <tag> <group> <pkg> [<pkg>...]
|
||||
"""Usage: %s add-group-pkg [options] <tag> <group> <pkg> [<pkg> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ class TestAddHost(unittest.TestCase):
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %s add-host [options] hostname arch [arch2 ...]
|
||||
expected_stderr = """Usage: %s add-host [options] <hostname> <arch> [<arch> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Please specify a hostname and at least one arch
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ class TestAddHostToChannel(unittest.TestCase):
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %s add-host-to-channel [options] hostname channel
|
||||
expected_stderr = """Usage: %s add-host-to-channel [options] <hostname> <channel>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Please specify a hostname and a channel
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ class TestAddPkg(unittest.TestCase):
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %s add-pkg [options] tag package [package2 ...]
|
||||
expected_stderr = """Usage: %s add-pkg [options] <tag> <package> [<package> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Please specify an owner for the package(s)
|
||||
|
|
@ -239,7 +239,7 @@ class TestAddPkg(unittest.TestCase):
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %s add-pkg [options] tag package [package2 ...]
|
||||
expected_stderr = """Usage: %s add-pkg [options] <tag> <package> [<package> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Please specify a tag and at least one package
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class TestAddTag(utils.CliTestCase):
|
|||
maxDiff = None
|
||||
|
||||
def setUp(self):
|
||||
self.error_format = """Usage: %s add-tag [options] name
|
||||
self.error_format = """Usage: %s add-tag [options] <name>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -80,7 +80,7 @@ class TestAddTag(utils.CliTestCase):
|
|||
def test_handle_add_tag_help(self):
|
||||
self.assert_help(
|
||||
handle_add_tag,
|
||||
"""Usage: %s add-tag [options] name
|
||||
"""Usage: %s add-tag [options] <name>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class TestAddUser(utils.CliTestCase):
|
|||
maxDiff = None
|
||||
|
||||
def setUp(self):
|
||||
self.error_format = """Usage: %s add-user username [options]
|
||||
self.error_format = """Usage: %s add-user <username> [options]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -82,7 +82,7 @@ class TestAddUser(utils.CliTestCase):
|
|||
def test_handle_add_user_help(self):
|
||||
self.assert_help(
|
||||
handle_add_user,
|
||||
"""Usage: %s add-user username [options]
|
||||
"""Usage: %s add-user <username> [options]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class TestAddVolume(utils.CliTestCase):
|
|||
maxDiff = None
|
||||
|
||||
def setUp(self):
|
||||
self.error_format = """Usage: %s add-volume volume-name
|
||||
self.error_format = """Usage: %s add-volume <volume-name>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -66,7 +66,7 @@ class TestAddVolume(utils.CliTestCase):
|
|||
def test_handle_add_volume_help(self):
|
||||
self.assert_help(
|
||||
handle_add_volume,
|
||||
"""Usage: %s add-volume volume-name
|
||||
"""Usage: %s add-volume <volume-name>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class TestBlockGroupPkg(utils.CliTestCase):
|
|||
self.options = mock.MagicMock()
|
||||
self.activate_session = mock.patch('koji_cli.commands.activate_session').start()
|
||||
|
||||
self.error_format = """Usage: %s block-group-pkg [options] <tag> <group> <pkg> [<pkg>...]
|
||||
self.error_format = """Usage: %s block-group-pkg [options] <tag> <group> <pkg> [<pkg> ...]
|
||||
Note that blocking is propagated through the inheritance chain, so it is not exactly the same as package removal.
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ Note that blocking is propagated through the inheritance chain, so it is not exa
|
|||
def test_handle_block_group_pkg_help(self):
|
||||
self.assert_help(
|
||||
handle_block_group_pkg,
|
||||
"""Usage: %s block-group-pkg [options] <tag> <group> <pkg> [<pkg>...]
|
||||
"""Usage: %s block-group-pkg [options] <tag> <group> <pkg> [<pkg> ...]
|
||||
Note that blocking is propagated through the inheritance chain, so it is not exactly the same as package removal.
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ class TestBlockPkg(unittest.TestCase):
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %s block-pkg [options] tag package [package2 ...]
|
||||
expected_stderr = """Usage: %s block-pkg [options] <tag> <package> [<package> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Please specify a tag and at least one package
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ Task info: weburl/taskinfo?taskID=1
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %s build [options] target <srpm path or scm url>
|
||||
expected_stderr = """Usage: %s build [options] <target> <srpm path or scm url>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Exactly two arguments (a build target and a SCM URL or srpm file) are required
|
||||
|
|
@ -192,7 +192,7 @@ Task info: weburl/taskinfo?taskID=1
|
|||
handle_build(self.options, self.session, args)
|
||||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = """Usage: %s build [options] target <srpm path or scm url>
|
||||
expected_stdout = """Usage: %s build [options] <target> <srpm path or scm url>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
@ -255,7 +255,7 @@ Options:
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %s build [options] target <srpm path or scm url>
|
||||
expected_stderr = """Usage: %s build [options] <target> <srpm path or scm url>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: --arch_override is only allowed for --scratch builds
|
||||
|
|
@ -350,7 +350,7 @@ Task info: weburl/taskinfo?taskID=1
|
|||
with self.assertRaises(SystemExit) as cm:
|
||||
handle_build(self.options, self.session, args)
|
||||
actual = stderr.getvalue()
|
||||
expected = """Usage: %s build [options] target <srpm path or scm url>
|
||||
expected = """Usage: %s build [options] <target> <srpm path or scm url>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Unknown build target: target
|
||||
|
|
@ -401,7 +401,7 @@ Task info: weburl/taskinfo?taskID=1
|
|||
with self.assertRaises(SystemExit) as cm:
|
||||
handle_build(self.options, self.session, args)
|
||||
actual = stderr.getvalue()
|
||||
expected = """Usage: %s build [options] target <srpm path or scm url>
|
||||
expected = """Usage: %s build [options] <target> <srpm path or scm url>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Unknown destination tag: dest_tag_name
|
||||
|
|
@ -452,7 +452,7 @@ Task info: weburl/taskinfo?taskID=1
|
|||
with self.assertRaises(SystemExit) as cm:
|
||||
handle_build(self.options, self.session, args)
|
||||
actual = stderr.getvalue()
|
||||
expected = """Usage: %s build [options] target <srpm path or scm url>
|
||||
expected = """Usage: %s build [options] <target> <srpm path or scm url>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Destination tag dest_tag_name is locked
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class TestCall(utils.CliTestCase):
|
|||
maxDiff = None
|
||||
|
||||
def setUp(self):
|
||||
self.error_format = """Usage: %s call [options] name [arg...]
|
||||
self.error_format = """Usage: %s call [options] <name> [<arg> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -136,7 +136,7 @@ class TestCall(utils.CliTestCase):
|
|||
"""Test handle_call help message"""
|
||||
self.assert_help(
|
||||
handle_call,
|
||||
"""Usage: %s call [options] name [arg...]
|
||||
"""Usage: %s call [options] <name> [<arg> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ Task info: weburl/taskinfo?taskID=1
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %s chain-build [options] target URL [URL2 [:] URL3 [:] URL4 ...]
|
||||
expected_stderr = """Usage: %s chain-build [options] <target> <URL> [<URL> [:] <URL> [:] <URL> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: At least two arguments (a build target and a SCM URL) are required
|
||||
|
|
@ -147,7 +147,7 @@ Task info: weburl/taskinfo?taskID=1
|
|||
handle_chain_build(self.options, self.session, args)
|
||||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = """Usage: %s chain-build [options] target URL [URL2 [:] URL3 [:] URL4 ...]
|
||||
expected_stdout = """Usage: %s chain-build [options] <target> <URL> [<URL> [:] <URL> [:] <URL> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
@ -206,7 +206,7 @@ Options:
|
|||
with self.assertRaises(SystemExit) as cm:
|
||||
handle_chain_build(self.options, self.session, args)
|
||||
actual = stderr.getvalue()
|
||||
expected = """Usage: %s chain-build [options] target URL [URL2 [:] URL3 [:] URL4 ...]
|
||||
expected = """Usage: %s chain-build [options] <target> <URL> [<URL> [:] <URL> [:] <URL> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Unknown build target: target
|
||||
|
|
@ -268,7 +268,7 @@ Options:
|
|||
with self.assertRaises(SystemExit) as cm:
|
||||
handle_chain_build(self.options, self.session, args)
|
||||
actual = stderr.getvalue()
|
||||
expected = """Usage: %s chain-build [options] target URL [URL2 [:] URL3 [:] URL4 ...]
|
||||
expected = """Usage: %s chain-build [options] <target> <URL> [<URL> [:] <URL> [:] <URL> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Destination tag dest_tag is locked
|
||||
|
|
@ -461,7 +461,7 @@ Target target is not usable for a chain-build
|
|||
with self.assertRaises(SystemExit) as cm:
|
||||
handle_chain_build(self.options, self.session, args)
|
||||
actual = stderr.getvalue()
|
||||
expected = """Usage: %s chain-build [options] target URL [URL2 [:] URL3 [:] URL4 ...]
|
||||
expected = """Usage: %s chain-build [options] <target> <URL> [<URL> [:] <URL> [:] <URL> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: You must specify at least one dependency between builds with : (colon)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class TestDisableHost(utils.CliTestCase):
|
|||
maxDiff = None
|
||||
|
||||
def setUp(self):
|
||||
self.error_format = """Usage: %s disable-host [options] hostname ...
|
||||
self.error_format = """Usage: %s disable-host [options] <hostname> [<hostname> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -123,7 +123,7 @@ class TestDisableHost(utils.CliTestCase):
|
|||
"""Test %s help message""" % handle_disable_host.__name__
|
||||
self.assert_help(
|
||||
handle_disable_host,
|
||||
"""Usage: %s disable-host [options] hostname ...
|
||||
"""Usage: %s disable-host [options] <hostname> [<hostname> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class TestDisableUser(utils.CliTestCase):
|
|||
maxDiff = None
|
||||
|
||||
def setUp(self):
|
||||
self.error_format = """Usage: %s disable-user username
|
||||
self.error_format = """Usage: %s disable-user <username>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -63,7 +63,7 @@ class TestDisableUser(utils.CliTestCase):
|
|||
def test_handle_disable_user_help(self):
|
||||
self.assert_help(
|
||||
handle_disable_user,
|
||||
"""Usage: %s disable-user username
|
||||
"""Usage: %s disable-user <username>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ class TestDistRepo(utils.CliTestCase):
|
|||
self.session.getTag.return_value = copy.deepcopy(self.TAG)
|
||||
self.session.distRepo.return_value = self.task_id
|
||||
|
||||
self.error_format = """Usage: %s dist-repo [options] tag keyID [keyID...]
|
||||
(Specify the --help option for a list of other options)
|
||||
self.error_format = """Usage: %s dist-repo [options] <tag> <key_id> [<key_id> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
""" % (self.progname, self.progname)
|
||||
|
|
@ -248,8 +248,8 @@ class TestDistRepo(utils.CliTestCase):
|
|||
"""Test handle_dist_repo help message"""
|
||||
self.assert_help(
|
||||
handle_dist_repo,
|
||||
"""Usage: %s dist-repo [options] tag keyID [keyID...]
|
||||
(Specify the --help option for a list of other options)
|
||||
"""Usage: %s dist-repo [options] <tag> <key_id> [<key_id> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
-h, --help show this help message and exit
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ class TestEditHost(unittest.TestCase):
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %s edit-host hostname ... [options]
|
||||
expected_stderr = """Usage: %s edit-host <hostname> [<hostname> ...] [options]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Please specify a hostname
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class TestEditTag(unittest.TestCase):
|
|||
handle_edit_tag(options, session, args)
|
||||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = """Usage: %s edit-tag [options] name
|
||||
expected_stdout = """Usage: %s edit-tag [options] <name>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
@ -162,7 +162,7 @@ Options:
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %(progname)s edit-tag [options] name
|
||||
expected_stderr = """Usage: %(progname)s edit-tag [options] <name>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%(progname)s: error: Please specify a name for the tag
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class TestEditUser(unittest.TestCase):
|
|||
handle_edit_user(options, session, args)
|
||||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = """Usage: %s edit-user name [options]
|
||||
expected_stdout = """Usage: %s edit-user <username> [options]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
@ -106,7 +106,7 @@ Options:
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %(progname)s edit-user name [options]
|
||||
expected_stderr = """Usage: %(progname)s edit-user <username> [options]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%(progname)s: error: You must specify the username of the user to edit
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class TestEnableHost(utils.CliTestCase):
|
|||
maxDiff = None
|
||||
|
||||
def setUp(self):
|
||||
self.error_format = """Usage: %s enable-host [options] hostname ...
|
||||
self.error_format = """Usage: %s enable-host [options] <hostname> [<hostname> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -122,7 +122,7 @@ class TestEnableHost(utils.CliTestCase):
|
|||
"""Test %s help message""" % handle_enable_host.__name__
|
||||
self.assert_help(
|
||||
handle_enable_host,
|
||||
"""Usage: %s enable-host [options] hostname ...
|
||||
"""Usage: %s enable-host [options] <hostname> [<hostname> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class TestEnableUser(utils.CliTestCase):
|
|||
maxDiff = None
|
||||
|
||||
def setUp(self):
|
||||
self.error_format = """Usage: %s enable-user username
|
||||
self.error_format = """Usage: %s enable-user <username>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -63,7 +63,7 @@ class TestEnableUser(utils.CliTestCase):
|
|||
def test_handle_enable_user_help(self):
|
||||
self.assert_help(
|
||||
handle_enable_user,
|
||||
"""Usage: %s enable-user username
|
||||
"""Usage: %s enable-user <username>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ class TestHello(utils.CliTestCase):
|
|||
print_unicode_mock.return_value = "Hello"
|
||||
|
||||
expect = """Usage: %s moshimoshi [options]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: This command takes no arguments
|
||||
""" % (self.progname, self.progname)
|
||||
|
|
@ -102,6 +103,7 @@ class TestHello(utils.CliTestCase):
|
|||
self.assert_help(
|
||||
handle_moshimoshi,
|
||||
"""Usage: %s moshimoshi [options]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
-h, --help show this help message and exit
|
||||
|
|
|
|||
|
|
@ -227,8 +227,8 @@ class TestImageBuild(utils.CliTestCase):
|
|||
self.session = mock.MagicMock()
|
||||
self.configparser = mock.patch('six.moves.configparser.ConfigParser').start()
|
||||
|
||||
self.error_format = """Usage: %s image-build [options] <name> <version> <target> <install-tree-url> <arch> [<arch>...]
|
||||
%s image-build --config FILE
|
||||
self.error_format = """Usage: %s image-build [options] <name> <version> <target> <install-tree-url> <arch> [<arch> ...]
|
||||
%s image-build --config <FILE>
|
||||
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
|
|
@ -328,8 +328,8 @@ class TestImageBuild(utils.CliTestCase):
|
|||
"""Test handle_image_build help message"""
|
||||
self.assert_help(
|
||||
handle_image_build,
|
||||
"""Usage: %s image-build [options] <name> <version> <target> <install-tree-url> <arch> [<arch>...]
|
||||
%s image-build --config FILE
|
||||
"""Usage: %s image-build [options] <name> <version> <target> <install-tree-url> <arch> [<arch> ...]
|
||||
%s image-build --config <FILE>
|
||||
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ class TestImageBuildIndirection(utils.CliTestCase):
|
|||
self.session = mock.MagicMock()
|
||||
|
||||
self.error_format = """Usage: %s image-build-indirection [base_image] [utility_image] [indirection_build_template]
|
||||
%s image-build --config FILE
|
||||
%s image-build --config <FILE>
|
||||
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
|
|
@ -220,7 +220,7 @@ class TestImageBuildIndirection(utils.CliTestCase):
|
|||
self.assert_help(
|
||||
handle_image_build_indirection,
|
||||
"""Usage: %s image-build-indirection [base_image] [utility_image] [indirection_build_template]
|
||||
%s image-build --config FILE
|
||||
%s image-build --config <FILE>
|
||||
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class TestImport(utils.CliTestCase):
|
|||
'CANCELED': 4,
|
||||
}
|
||||
|
||||
self.error_format = """Usage: %s import [options] package [package...]
|
||||
self.error_format = """Usage: %s import [options] <package> [<package> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -681,7 +681,7 @@ class TestImport(utils.CliTestCase):
|
|||
"""Test handle_import function help message"""
|
||||
self.assert_help(
|
||||
handle_import,
|
||||
"""Usage: %s import [options] package [package...]
|
||||
"""Usage: %s import [options] <package> [<package> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class TestImportCG(utils.CliTestCase):
|
|||
def setUp(self):
|
||||
self.custom_os_path_exists = {}
|
||||
self.os_path_exists = os.path.exists
|
||||
self.error_format = """Usage: %s import-cg [options] metadata_file files_dir
|
||||
self.error_format = """Usage: %s import-cg [options] <metadata_file> <files_dir>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -209,7 +209,7 @@ class TestImportCG(utils.CliTestCase):
|
|||
"""Test handle_import_cg help message"""
|
||||
self.assert_help(
|
||||
handle_import_cg,
|
||||
"""Usage: %s import-cg [options] metadata_file files_dir
|
||||
"""Usage: %s import-cg [options] <metadata_file> <files_dir>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
from __future__ import absolute_import
|
||||
import base64
|
||||
import copy
|
||||
import hashlib
|
||||
import mock
|
||||
|
|
@ -68,7 +67,7 @@ class TestImportSIG(utils.CliTestCase):
|
|||
}
|
||||
]
|
||||
|
||||
self.error_format = """Usage: %s import-sig [options] package [package...]
|
||||
self.error_format = """Usage: %s import-sig [options] <package> [<package> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -274,7 +273,7 @@ class TestImportSIG(utils.CliTestCase):
|
|||
"""Test handle_import_sig help message"""
|
||||
self.assert_help(
|
||||
handle_import_sig,
|
||||
"""Usage: %s import-sig [options] package [package...]
|
||||
"""Usage: %s import-sig [options] <package> [<package> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class TestListGroups(utils.CliTestCase):
|
|||
self.activate_session = mock.patch('koji_cli.commands.activate_session').start()
|
||||
self.event_from_opts = mock.patch('koji.util.eventFromOpts').start()
|
||||
|
||||
self.error_format = """Usage: %s list-groups [options] <tag> [group]
|
||||
self.error_format = """Usage: %s list-groups [options] <tag> [<group>]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -184,7 +184,7 @@ class TestListGroups(utils.CliTestCase):
|
|||
def test_anon_handle_list_groups_help(self):
|
||||
self.assert_help(
|
||||
anon_handle_list_groups,
|
||||
"""Usage: %s list-groups [options] <tag> [group]
|
||||
"""Usage: %s list-groups [options] <tag> [<group>]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class TestCliListTagged(utils.CliTestCase):
|
|||
self.original_timezone = os.environ.get('TZ')
|
||||
os.environ['TZ'] = 'US/Eastern'
|
||||
time.tzset()
|
||||
self.error_format = """Usage: %s list-tagged [options] tag [package]
|
||||
self.error_format = """Usage: %s list-tagged [options] <tag> [<package>]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -232,7 +232,7 @@ class TestCliListTagged(utils.CliTestCase):
|
|||
def test_handle_list_tagged_help(self):
|
||||
self.assert_help(
|
||||
anon_handle_list_tagged,
|
||||
"""Usage: %s list-tagged [options] tag [package]
|
||||
"""Usage: %s list-tagged [options] <tag> [<package>]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -108,8 +108,8 @@ Task info: weburl/taskinfo?taskID=1
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %s maven-build [options] target URL
|
||||
%s maven-build --ini=CONFIG... [options] target
|
||||
expected_stderr = """Usage: %s maven-build [options] <target> <URL>
|
||||
%s maven-build --ini=CONFIG... [options] <target>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Exactly two arguments (a build target and a SCM URL) are required
|
||||
|
|
@ -151,8 +151,8 @@ Task info: weburl/taskinfo?taskID=1
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %s maven-build [options] target URL
|
||||
%s maven-build --ini=CONFIG... [options] target
|
||||
expected_stderr = """Usage: %s maven-build [options] <target> <URL>
|
||||
%s maven-build --ini=CONFIG... [options] <target>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Exactly one argument (a build target) is required
|
||||
|
|
@ -193,8 +193,8 @@ Task info: weburl/taskinfo?taskID=1
|
|||
handle_maven_build(self.options, self.session, args)
|
||||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = """Usage: %s maven-build [options] target URL
|
||||
%s maven-build --ini=CONFIG... [options] target
|
||||
expected_stdout = """Usage: %s maven-build [options] <target> <URL>
|
||||
%s maven-build --ini=CONFIG... [options] <target>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
@ -268,8 +268,8 @@ Options:
|
|||
with self.assertRaises(SystemExit) as cm:
|
||||
handle_maven_build(self.options, self.session, args)
|
||||
actual = stderr.getvalue()
|
||||
expected = """Usage: %s maven-build [options] target URL
|
||||
%s maven-build --ini=CONFIG... [options] target
|
||||
expected = """Usage: %s maven-build [options] <target> <URL>
|
||||
%s maven-build --ini=CONFIG... [options] <target>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Unknown build target: target
|
||||
|
|
@ -316,8 +316,8 @@ Options:
|
|||
with self.assertRaises(SystemExit) as cm:
|
||||
handle_maven_build(self.options, self.session, args)
|
||||
actual = stderr.getvalue()
|
||||
expected = """Usage: %s maven-build [options] target URL
|
||||
%s maven-build --ini=CONFIG... [options] target
|
||||
expected = """Usage: %s maven-build [options] <target> <URL>
|
||||
%s maven-build --ini=CONFIG... [options] <target>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Unknown destination tag: dest_tag
|
||||
|
|
@ -364,8 +364,8 @@ Options:
|
|||
with self.assertRaises(SystemExit) as cm:
|
||||
handle_maven_build(self.options, self.session, args)
|
||||
actual = stderr.getvalue()
|
||||
expected = """Usage: %s maven-build [options] target URL
|
||||
%s maven-build --ini=CONFIG... [options] target
|
||||
expected = """Usage: %s maven-build [options] <target> <URL>
|
||||
%s maven-build --ini=CONFIG... [options] <target>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Destination tag dest_tag is locked
|
||||
|
|
@ -476,8 +476,8 @@ Task info: weburl/taskinfo?taskID=1
|
|||
with self.assertRaises(SystemExit) as cm:
|
||||
handle_maven_build(self.options, self.session, args)
|
||||
actual = stderr.getvalue()
|
||||
expected = """Usage: %s maven-build [options] target URL
|
||||
%s maven-build --ini=CONFIG... [options] target
|
||||
expected = """Usage: %s maven-build [options] <target> <URL>
|
||||
%s maven-build --ini=CONFIG... [options] <target>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Section section does not contain a maven-build config
|
||||
|
|
@ -507,8 +507,8 @@ Task info: weburl/taskinfo?taskID=1
|
|||
with self.assertRaises(SystemExit) as cm:
|
||||
handle_maven_build(self.options, self.session, args)
|
||||
actual = stderr.getvalue()
|
||||
expected = """Usage: %s maven-build [options] target URL
|
||||
%s maven-build --ini=CONFIG... [options] target
|
||||
expected = """Usage: %s maven-build [options] <target> <URL>
|
||||
%s maven-build --ini=CONFIG... [options] <target>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: errormsg
|
||||
|
|
@ -557,8 +557,8 @@ Task info: weburl/taskinfo?taskID=1
|
|||
with self.assertRaises(SystemExit) as cm:
|
||||
handle_maven_build(self.options, self.session, args)
|
||||
actual = stderr.getvalue()
|
||||
expected = """Usage: %s maven-build [options] target URL
|
||||
%s maven-build --ini=CONFIG... [options] target
|
||||
expected = """Usage: %s maven-build [options] <target> <URL>
|
||||
%s maven-build --ini=CONFIG... [options] <target>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Invalid SCM URL: badscm
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class TestMavenChain(utils.CliTestCase):
|
|||
self.config = 'config'
|
||||
self.task_id = 101
|
||||
|
||||
self.error_format = """Usage: %s maven-chain [options] target config...
|
||||
self.error_format = """Usage: %s maven-chain [options] <target> <config> [<config> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -175,7 +175,7 @@ class TestMavenChain(utils.CliTestCase):
|
|||
"""Test handle_maven_chain help message full output"""
|
||||
self.assert_help(
|
||||
handle_maven_chain,
|
||||
"""Usage: %s maven-chain [options] target config...
|
||||
"""Usage: %s maven-chain [options] <target> <config> [<config> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class TestMoveBuild(utils.CliTestCase):
|
|||
self.session = mock.MagicMock()
|
||||
self.options = mock.MagicMock()
|
||||
|
||||
self.error_format = """Usage: %s move-build [options] <tag1> <tag2> <pkg> [<pkg>...]
|
||||
self.error_format = """Usage: %s move-build [options] <tag1> <tag2> <pkg> [<pkg> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -147,7 +147,7 @@ class TestMoveBuild(utils.CliTestCase):
|
|||
"""Test handle_move_build help message"""
|
||||
self.assert_help(
|
||||
handle_move_build,
|
||||
"""Usage: %s move-build [options] <tag1> <tag2> <pkg> [<pkg>...]
|
||||
"""Usage: %s move-build [options] <tag1> <tag2> <pkg> [<pkg> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class TestRemoveChannel(unittest.TestCase):
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %s remove-channel [options] channel
|
||||
expected_stderr = """Usage: %s remove-channel [options] <channel>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Incorrect number of arguments
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ class TestRemoveHostFromChannel(unittest.TestCase):
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %s remove-host-from-channel [options] hostname channel
|
||||
expected_stderr = """Usage: %s remove-host-from-channel [options] <hostname> <channel>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Please specify a hostname and a channel
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ class TestRemovePkg(unittest.TestCase):
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %s remove-pkg [options] tag package [package2 ...]
|
||||
expected_stderr = """Usage: %s remove-pkg [options] <tag> <package> [<package> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Please specify a tag and at least one package
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ class TestRenameChannel(unittest.TestCase):
|
|||
actual_stdout = stdout.getvalue()
|
||||
actual_stderr = stderr.getvalue()
|
||||
expected_stdout = ''
|
||||
expected_stderr = """Usage: %s rename-channel [options] old-name new-name
|
||||
expected_stderr = """Usage: %s rename-channel [options] <old-name> <new-name>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: Incorrect number of arguments
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ Log Files:
|
|||
/mnt/koji/work/tasks/2/2/mergerepos.log
|
||||
"""
|
||||
|
||||
self.error_format = """Usage: %s resubmit [options] taskID
|
||||
self.error_format = """Usage: %s resubmit [options] <task_id>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -123,7 +123,7 @@ Log Files:
|
|||
"""Test handle_resubmit help message output"""
|
||||
self.assert_help(
|
||||
handle_resubmit,
|
||||
"""Usage: %s resubmit [options] taskID
|
||||
"""Usage: %s resubmit [options] <task_id>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class TestSearch(utils.CliTestCase):
|
|||
maxDiff = None
|
||||
|
||||
def setUp(self):
|
||||
self.error_format = """Usage: %s search [options] search_type pattern
|
||||
self.error_format = """Usage: %s search [options] <search_type> <pattern>
|
||||
Available search types: package, build, tag, target, user, host, rpm, maven, win
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ Available search types: package, build, tag, target, user, host, rpm, maven, win
|
|||
def test_anon_handle_search_help(self):
|
||||
self.assert_help(
|
||||
anon_handle_search,
|
||||
"""Usage: %s search [options] search_type pattern
|
||||
"""Usage: %s search [options] <search_type> <pattern>
|
||||
Available search types: package, build, tag, target, user, host, rpm, maven, win
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class TestSetBuildVolume(utils.CliTestCase):
|
|||
maxDiff = None
|
||||
|
||||
def setUp(self):
|
||||
self.error_format = """Usage: %s set-build-volume volume n-v-r [n-v-r ...]
|
||||
self.error_format = """Usage: %s set-build-volume <volume> <n-v-r> [<n-v-r> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -104,7 +104,7 @@ class TestSetBuildVolume(utils.CliTestCase):
|
|||
def test_handle_set_build_volume_help(self):
|
||||
self.assert_help(
|
||||
handle_set_build_volume,
|
||||
"""Usage: %s set-build-volume volume n-v-r [n-v-r ...]
|
||||
"""Usage: %s set-build-volume <volume> <n-v-r> [<n-v-r> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class TestSetPkgArches(utils.CliTestCase):
|
|||
maxDiff = None
|
||||
|
||||
def setUp(self):
|
||||
self.error_format = """Usage: %s set-pkg-arches [options] arches tag package [package2 ...]
|
||||
self.error_format = """Usage: %s set-pkg-arches [options] <arches> <tag> <package> [<package> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -59,7 +59,7 @@ class TestSetPkgArches(utils.CliTestCase):
|
|||
def test_handle_set_pkg_arches_help(self):
|
||||
self.assert_help(
|
||||
handle_set_pkg_arches,
|
||||
"""Usage: %s set-pkg-arches [options] arches tag package [package2 ...]
|
||||
"""Usage: %s set-pkg-arches [options] <arches> <tag> <package> [<package> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class TestSetPkgOwner(utils.CliTestCase):
|
|||
maxDiff = None
|
||||
|
||||
def setUp(self):
|
||||
self.error_format = """Usage: %s set-pkg-owner [options] owner tag package [package2 ...]
|
||||
self.error_format = """Usage: %s set-pkg-owner [options] <owner> <tag> <package> [<package> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -59,7 +59,7 @@ class TestSetPkgOwner(utils.CliTestCase):
|
|||
def test_handle_set_pkg_owner_help(self):
|
||||
self.assert_help(
|
||||
handle_set_pkg_owner,
|
||||
"""Usage: %s set-pkg-owner [options] owner tag package [package2 ...]
|
||||
"""Usage: %s set-pkg-owner [options] <owner> <tag> <package> [<package> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class TestSetTaskPriority(utils.CliTestCase):
|
|||
maxDiff = None
|
||||
|
||||
def setUp(self):
|
||||
self.error_format = """Usage: %s set-task-priority [options] --priority=<priority> <task-id> [task-id]...
|
||||
self.error_format = """Usage: %s set-task-priority [options] --priority=<priority> <task_id> [<task_id> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -82,7 +82,7 @@ class TestSetTaskPriority(utils.CliTestCase):
|
|||
def test_handle_set_task_priority_help(self):
|
||||
self.assert_help(
|
||||
handle_set_task_priority,
|
||||
"""Usage: %s set-task-priority [options] --priority=<priority> <task-id> [task-id]...
|
||||
"""Usage: %s set-task-priority [options] --priority=<priority> <task_id> [<task_id> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class TestTagBuild(utils.CliTestCase):
|
|||
self.session = mock.MagicMock()
|
||||
self.options = mock.MagicMock()
|
||||
|
||||
self.error_format = """Usage: %s tag-build [options] <tag> <pkg> [<pkg>...]
|
||||
self.error_format = """Usage: %s tag-build [options] <tag> <pkg> [<pkg> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -89,7 +89,7 @@ class TestTagBuild(utils.CliTestCase):
|
|||
def test_handle_tag_build_help(self):
|
||||
self.assert_help(
|
||||
handle_tag_build,
|
||||
"""Usage: %s tag-build [options] <tag> <pkg> [<pkg>...]
|
||||
"""Usage: %s tag-build [options] <tag> <pkg> [<pkg> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -588,7 +588,7 @@ class TestTaskInfo(utils.CliTestCase):
|
|||
maxDiff = None
|
||||
|
||||
def setUp(self):
|
||||
self.error_format = """Usage: %s taskinfo [options] taskID [taskID...]
|
||||
self.error_format = """Usage: %s taskinfo [options] <task_id> [<task_id> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -638,7 +638,7 @@ Host: kojibuilder
|
|||
def test_anon_handle_taskinfo_help(self):
|
||||
self.assert_help(
|
||||
anon_handle_taskinfo,
|
||||
"""Usage: %s taskinfo [options] taskID [taskID...]
|
||||
"""Usage: %s taskinfo [options] <task_id> [<task_id> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class TestBlockGroupPkg(utils.CliTestCase):
|
|||
self.options = mock.MagicMock()
|
||||
self.activate_session = mock.patch('koji_cli.commands.activate_session').start()
|
||||
|
||||
self.error_format = """Usage: %s unblock-group-pkg [options] <tag> <group> <pkg> [<pkg>...]
|
||||
self.error_format = """Usage: %s unblock-group-pkg [options] <tag> <group> <pkg> [<pkg> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -54,7 +54,7 @@ class TestBlockGroupPkg(utils.CliTestCase):
|
|||
def test_handle_unblock_group_pkg_help(self):
|
||||
self.assert_help(
|
||||
handle_unblock_group_pkg,
|
||||
"""Usage: %s unblock-group-pkg [options] <tag> <group> <pkg> [<pkg>...]
|
||||
"""Usage: %s unblock-group-pkg [options] <tag> <group> <pkg> [<pkg> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class TestUnblockPkg(utils.CliTestCase):
|
|||
maxDiff = None
|
||||
|
||||
def setUp(self):
|
||||
self.error_format = """Usage: %s unblock-pkg [options] tag package [package2 ...]
|
||||
self.error_format = """Usage: %s unblock-pkg [options] <tag> <package> [<package> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -60,7 +60,7 @@ class TestUnblockPkg(utils.CliTestCase):
|
|||
def test_handle_unblock_pkg_help(self):
|
||||
self.assert_help(
|
||||
handle_unblock_pkg,
|
||||
"""Usage: %s unblock-pkg [options] tag package [package2 ...]
|
||||
"""Usage: %s unblock-pkg [options] <tag> <package> [<package> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class TestWrapperRpm(utils.CliTestCase):
|
|||
self.scm_url = 'git+https://github.com/project/test#12345'
|
||||
self.task_id = 1
|
||||
|
||||
self.error_format = """Usage: %s wrapper-rpm [options] target build-id|n-v-r URL
|
||||
self.error_format = """Usage: %s wrapper-rpm [options] <target> <build-id|n-v-r> <URL>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -223,7 +223,7 @@ class TestWrapperRpm(utils.CliTestCase):
|
|||
"""Test handle_wrapper_rpm help message output"""
|
||||
self.assert_help(
|
||||
handle_wrapper_rpm,
|
||||
"""Usage: %s wrapper-rpm [options] target build-id|n-v-r URL
|
||||
"""Usage: %s wrapper-rpm [options] <target> <build-id|n-v-r> <URL>
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ class TestWriteSignedRPM(utils.CliTestCase):
|
|||
def setUp(self):
|
||||
self.custom_os_path_exists = {}
|
||||
self.os_path_exists = os.path.exists
|
||||
self.error_format = """Usage: %s write-signed-rpm [options] <signature-key> n-v-r [n-v-r...]
|
||||
self.error_format = """Usage: %s write-signed-rpm [options] <signature-key> <n-v-r> [<n-v-r> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
%s: error: {message}
|
||||
|
|
@ -238,7 +238,7 @@ class TestWriteSignedRPM(utils.CliTestCase):
|
|||
"""Test handle_write_signed_rpm help message"""
|
||||
self.assert_help(
|
||||
handle_write_signed_rpm,
|
||||
"""Usage: %s write-signed-rpm [options] <signature-key> n-v-r [n-v-r...]
|
||||
"""Usage: %s write-signed-rpm [options] <signature-key> <n-v-r> [<n-v-r> ...]
|
||||
(Specify the --help global option for a list of other help options)
|
||||
|
||||
Options:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue