Verified Commit 9e7c2975 authored by Adam Mercer's avatar Adam Mercer
Browse files

update koji.add_pkg to add --owner flag

parent cc82cd38
......@@ -44,8 +44,8 @@ def list_pkgs(*args, **kwargs):
def add_pkg(*args, **kwargs):
# FIXME: this needs to be updated to automatically pass --owner in the
# appropriate place
# ensure --owner option is specified
args = ('--owner',) + args
return _koji_call('add-pkg', *args, **kwargs)
......
......@@ -120,9 +120,7 @@ def main():
logger.critical("owner not specified")
sys.exit(1)
try:
# FIXME: need to update koji.add_pkg() to pass --owner in the
# appropriate place
koji.add_pkg('--owner', args.owner, pkg_name, logger=logger)
koji.add_pkg(args.owner, pkg_name, logger=logger)
except subprocess.CalledProcessError as e:
logger.critical("unable to regsiter package: %s" % e)
raise
......
......@@ -48,11 +48,7 @@ def test_list_pkgs(call, _):
@mock.patch('gwkoji.koji.find_executable', return_value='/usr/bin/koji')
@mock.patch('gwkoji.koji.logged_check_call')
def test_add_pkg(call, _):
# FIXME: this needs to be updated to automatically pass --owner in the
# appropriate place
gwkoji_koji.add_pkg(
'--owner', 'albert.einstein@LIGO.ORG', 'foobar', logger=1
)
gwkoji_koji.add_pkg('albert.einstein@LIGO.ORG', 'foobar', logger=1)
call.assert_called_once_with(
('/usr/bin/koji', 'add-pkg', '--owner',
'albert.einstein@LIGO.ORG', 'foobar'), logger=1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment