[live-media] Pass ksurl to koji

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-02-11 17:09:30 +01:00
parent 96489a1e78
commit 93015d679c
2 changed files with 6 additions and 1 deletions

View File

@ -147,6 +147,9 @@ class KojiWrapper(object):
if options.get('skip_tag'): if options.get('skip_tag'):
cmd.append('--skip-tag') cmd.append('--skip-tag')
if 'ksurl' in options:
cmd.append('--ksurl=%s' % pipes.quote(options['ksurl']))
if wait: if wait:
cmd.append('--wait') cmd.append('--wait')

View File

@ -275,13 +275,15 @@ class LiveMediaTestCase(KojiWrapperBaseTestCase):
'name': 'name', 'version': '1', 'target': 'tgt', 'arch': 'x,y,z', 'name': 'name', 'version': '1', 'target': 'tgt', 'arch': 'x,y,z',
'ksfile': 'kickstart', 'install_tree': '/mnt/os', 'scratch': True, 'ksfile': 'kickstart', 'install_tree': '/mnt/os', 'scratch': True,
'repo': ['repo-1', 'repo-2'], 'skip_tag': True, 'repo': ['repo-1', 'repo-2'], 'skip_tag': True,
'ksurl': 'git://example.com/ksurl.git',
} }
cmd = self.koji.get_live_media_cmd(opts) cmd = self.koji.get_live_media_cmd(opts)
self.assertEqual(cmd[:8], self.assertEqual(cmd[:8],
['koji', 'spin-livemedia', 'name', '1', 'tgt', 'x,y,z', 'kickstart', ['koji', 'spin-livemedia', 'name', '1', 'tgt', 'x,y,z', 'kickstart',
'--install-tree=/mnt/os']) '--install-tree=/mnt/os'])
self.assertItemsEqual(cmd[8:], self.assertItemsEqual(cmd[8:],
['--repo=repo-1', '--repo=repo-2', '--skip-tag', '--scratch', '--wait']) ['--repo=repo-1', '--repo=repo-2', '--skip-tag', '--scratch', '--wait',
'--ksurl=git://example.com/ksurl.git'])
class LiveImageKojiWrapperTest(KojiWrapperBaseTestCase): class LiveImageKojiWrapperTest(KojiWrapperBaseTestCase):