| |
@@ -229,6 +229,71 @@
|
| |
flatpak=False
|
| |
)
|
| |
|
| |
+ def test_mutiple_arguments_repo_url(self):
|
| |
+ cli_cmd = ['rpkg', '--path', self.cloned_repo_path, 'container-build',
|
| |
+ '--target', 'f34-container-candidate', '--scratch',
|
| |
+ '--repo-url', 'a', 'b', '--repo-url', 'c']
|
| |
+
|
| |
+ with patch('sys.argv', new=cli_cmd):
|
| |
+ cli = self.new_cli()
|
| |
+ cli.container_build_koji()
|
| |
+
|
| |
+ self.assertEqual('f34-container-candidate', cli.cmd._target)
|
| |
+ self.mock_container_build_koji.assert_called_once_with(
|
| |
+ True,
|
| |
+ opts={
|
| |
+ 'scratch': True,
|
| |
+ 'quiet': False,
|
| |
+ 'release': None,
|
| |
+ 'isolated': False,
|
| |
+ 'koji_parent_build': None,
|
| |
+ 'yum_repourls': ['a', 'b', 'c'],
|
| |
+ 'dependency_replacements': None,
|
| |
+ 'git_branch': 'eng-rhel-7',
|
| |
+ 'arches': None,
|
| |
+ 'signing_intent': None,
|
| |
+ 'compose_ids': None,
|
| |
+ 'skip_build': False
|
| |
+ },
|
| |
+ kojiprofile='koji',
|
| |
+ build_client=utils.build_client,
|
| |
+ koji_task_watcher=koji_cli.lib.watch_tasks,
|
| |
+ nowait=False,
|
| |
+ flatpak=False
|
| |
+ )
|
| |
+
|
| |
+ def test_mutiple_arguments_compose_ids(self):
|
| |
+ cli_cmd = ['rpkg', '--path', self.cloned_repo_path, 'container-build',
|
| |
+ '--target', 'f34-container-candidate', '--scratch',
|
| |
+ '--compose-id', '1', '2', '--compose-id', '3']
|
| |
+
|
| |
+ with patch('sys.argv', new=cli_cmd):
|
| |
+ cli = self.new_cli()
|
| |
+ cli.container_build_koji()
|
| |
+
|
| |
+ self.mock_container_build_koji.assert_called_once_with(
|
| |
+ True,
|
| |
+ opts={
|
| |
+ 'scratch': True,
|
| |
+ 'quiet': False,
|
| |
+ 'release': None,
|
| |
+ 'isolated': False,
|
| |
+ 'koji_parent_build': None,
|
| |
+ 'yum_repourls': None,
|
| |
+ 'dependency_replacements': None,
|
| |
+ 'git_branch': 'eng-rhel-7',
|
| |
+ 'arches': None,
|
| |
+ 'signing_intent': None,
|
| |
+ 'compose_ids': [1, 2, 3],
|
| |
+ 'skip_build': False
|
| |
+ },
|
| |
+ kojiprofile='koji',
|
| |
+ build_client=utils.build_client,
|
| |
+ koji_task_watcher=koji_cli.lib.watch_tasks,
|
| |
+ nowait=False,
|
| |
+ flatpak=False
|
| |
+ )
|
| |
+
|
| |
def test_isolated(self):
|
| |
cli_cmd = ['rpkg', '--path', self.cloned_repo_path, 'container-build',
|
| |
'--isolated', '--build-release', '99']
|
| |
Presently, in container-build
--arg1 X --arg1 Y
equals--arg1=Y
, which ignoresX
and any other previous values. This MR accumulates all such values under the common argument.JIRA: RHELCMP-4112
Resolves: pagure #537
Signed-off-by: Aditya Bisoi abisoi@redhat.com