Skip to content

Commit

Permalink
Merge ee75bde into 165d30a
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBasti committed Nov 26, 2019
2 parents 165d30a + ee75bde commit 2741447
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions koji_containerbuild/plugins/cli_containerbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ def parse_source_arguments(options, args):
help=_("Signing intent of the ODCS composes [default: %default]."),
default=None, dest='signing_intent')
parser.add_option("--koji-build-id",
type="int",
help=_("Koji build id for sources, "
"is required or koji-build-nvr is provided"))
parser.add_option("--koji-build-nvr",
Expand Down
12 changes: 6 additions & 6 deletions tests/test_cli_containerbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def build_cli_args(target,
wait=None,
background=False,
build_type='container_build',
koji_build_id=12345,
koji_build_id='12345',
koji_build_nvr='test_nvr'):
"""Build command line arguments for cli_containerbuild.handle_build()"""
if build_type == 'container_build' or build_type == 'flatpak_build':
Expand Down Expand Up @@ -287,12 +287,12 @@ def test_cli_container_args(self, tmpdir, scratch, wait, quiet,
('override', 'intent1'),
))
@pytest.mark.parametrize(('scratch', 'koji_build_id', 'koji_build_nvr'), (
(None, 12345, None),
(True, 12345, None),
(None, '12345', None),
(True, '12345', None),
(None, None, 'build_nvr'),
(True, None, 'build_nvr'),
(None, 12345, 'build_nvr'),
(True, 12345, 'build_nvr'),
(None, '12345', 'build_nvr'),
(True, '12345', 'build_nvr'),
))
def test_cli_source_args(self, wait, quiet, channel_override,
signing_intent, scratch, koji_build_id, koji_build_nvr):
Expand Down Expand Up @@ -340,7 +340,7 @@ def test_cli_source_args(self, wait, quiet, channel_override,
assert build_opts.scratch == scratch
assert build_opts.wait == wait
assert build_opts.quiet == expected_quiet
assert build_opts.koji_build_id == koji_build_id
assert build_opts.koji_build_id == int(koji_build_id)
assert build_opts.koji_build_nvr == koji_build_nvr
assert build_opts.channel_override == expected_channel
assert build_opts.signing_intent == signing_intent
Expand Down

0 comments on commit 2741447

Please sign in to comment.