update cli tests
This commit is contained in:
parent
ac3f76a4de
commit
c02eb739aa
30 changed files with 667 additions and 695 deletions
|
|
@ -1,3 +1,11 @@
|
|||
import sys
|
||||
import time
|
||||
|
||||
import koji
|
||||
from koji.plugin import export_cli
|
||||
from koji_cli.lib import _, activate_session, OptionParser, list_task_output_all_volumes
|
||||
|
||||
@export_cli
|
||||
def handle_runroot(options, session, args):
|
||||
"[admin] Run a command in a buildroot"
|
||||
usage = _("usage: %prog runroot [options] <tag> <arch> <command>")
|
||||
|
|
@ -22,7 +30,7 @@ def handle_runroot(options, session, args):
|
|||
|
||||
if len(args) < 3:
|
||||
parser.error(_("Incorrect number of arguments"))
|
||||
activate_session(session)
|
||||
activate_session(session, options)
|
||||
tag = args[0]
|
||||
arch = args[1]
|
||||
if opts.use_shell:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
import koji
|
||||
from koji.plugin import export_cli
|
||||
from koji_cli.lib import _, activate_session, OptionParser, watch_tasks
|
||||
|
||||
@export_cli
|
||||
def handle_save_failed_tree(options, session, args):
|
||||
"Create tarball with whole buildtree"
|
||||
usage = _("usage: %prog save-failed-tree [options] ID")
|
||||
|
|
@ -26,7 +31,7 @@ def handle_save_failed_tree(options, session, args):
|
|||
except ValueError:
|
||||
parser.error(_("ID must be an integer"))
|
||||
|
||||
activate_session(session)
|
||||
activate_session(session, options)
|
||||
|
||||
if opts.mode == "buildroot":
|
||||
br_id = id_val
|
||||
|
|
@ -59,4 +64,4 @@ def handle_save_failed_tree(options, session, args):
|
|||
return
|
||||
else:
|
||||
session.logout()
|
||||
watch_tasks(session, [task_id], quiet=opts.quiet)
|
||||
watch_tasks(session, [task_id], quiet=opts.quiet, poll_interval=options.poll_interval)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue