image-build: Pass arches around as a list

Instead of joining the arches as a comma separated string and splitting
it again later. Ultimately we do need the original format to pass to
koji wrapper, but we can produce that value later.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-01-24 08:36:33 +01:00
parent 6c708549c8
commit 8418b68fb0
2 changed files with 31 additions and 26 deletions

View file

@ -66,11 +66,11 @@ class TestImageBuildPhase(PungiTestCase):
'target': 'f24',
'disk_size': 3,
'name': 'Fedora-Docker-Base',
'arches': 'amd64',
'arches': ['amd64'],
'version': 'Rawhide',
'ksurl': 'git://git.fedorahosted.org/git/spin-kickstarts.git',
'distro': 'Fedora-20',
'can_fail': 'x86_64',
'can_fail': ['x86_64'],
}
},
"conf_file": self.topdir + '/work/image-build/Client/docker_Fedora-Docker-Base.cfg',
@ -91,11 +91,11 @@ class TestImageBuildPhase(PungiTestCase):
'target': 'f24',
'disk_size': 3,
'name': 'Fedora-Docker-Base',
'arches': 'amd64,x86_64',
'arches': ['amd64', 'x86_64'],
'version': 'Rawhide',
'ksurl': 'git://git.fedorahosted.org/git/spin-kickstarts.git',
'distro': 'Fedora-20',
'can_fail': 'x86_64',
'can_fail': ['x86_64'],
}
},
"conf_file": self.topdir + '/work/image-build/Server/docker_Fedora-Docker-Base.cfg',
@ -151,7 +151,7 @@ class TestImageBuildPhase(PungiTestCase):
'target': 'f24',
'disk_size': 3,
'name': 'Fedora-Docker-Base',
'arches': 'amd64,x86_64',
'arches': ['amd64', 'x86_64'],
'version': 'Rawhide',
'ksurl': 'git://git.fedorahosted.org/git/spin-kickstarts.git',
'distro': 'Fedora-20',
@ -207,7 +207,7 @@ class TestImageBuildPhase(PungiTestCase):
'target': 'f24',
'disk_size': 3,
'name': 'Fedora-Docker-Base',
'arches': 'amd64,x86_64',
'arches': ['amd64', 'x86_64'],
'version': '25',
'ksurl': 'git://git.fedorahosted.org/git/spin-kickstarts.git',
'distro': 'Fedora-20',
@ -305,7 +305,7 @@ class TestImageBuildPhase(PungiTestCase):
'target': 'f24',
'disk_size': 3,
'name': 'Fedora-Docker-Base',
'arches': 'x86_64',
'arches': ['x86_64'],
'version': 'Rawhide',
'ksurl': 'git://git.fedorahosted.org/git/spin-kickstarts.git',
'distro': 'Fedora-20',
@ -369,7 +369,7 @@ class TestImageBuildPhase(PungiTestCase):
'target': 'f24',
'disk_size': 3,
'name': 'Fedora-Docker-Base',
'arches': 'x86_64',
'arches': ['x86_64'],
'version': 'Rawhide',
'ksurl': 'git://git.fedorahosted.org/git/spin-kickstarts.git',
'distro': 'Fedora-20',
@ -430,7 +430,7 @@ class TestImageBuildPhase(PungiTestCase):
'target': 'f24',
'disk_size': 3,
'name': 'Fedora-Docker-Base',
'arches': 'x86_64',
'arches': ['x86_64'],
'version': 'Rawhide',
'ksurl': 'git://git.fedorahosted.org/git/spin-kickstarts.git',
'distro': 'Fedora-20',
@ -603,11 +603,11 @@ class TestImageBuildPhase(PungiTestCase):
'target': 'f24',
'disk_size': 3,
'name': 'Fedora-Docker-Base',
'arches': 'x86_64',
'arches': ['x86_64'],
'version': 'Rawhide',
'ksurl': 'git://git.fedorahosted.org/git/spin-kickstarts.git',
'distro': 'Fedora-20',
'can_fail': 'x86_64',
'can_fail': ['x86_64'],
}
},
"conf_file": self.topdir + '/work/image-build/Server-optional/docker_Fedora-Docker-Base.cfg',
@ -663,11 +663,11 @@ class TestImageBuildPhase(PungiTestCase):
'target': 'f24',
'disk_size': 3,
'name': 'Fedora-Docker-Base',
'arches': 'amd64,x86_64',
'arches': ['amd64', 'x86_64'],
'version': 'Rawhide',
'ksurl': 'git://git.fedorahosted.org/git/spin-kickstarts.git',
'distro': 'Fedora-20',
'can_fail': 'amd64,x86_64',
'can_fail': ['amd64', 'x86_64'],
}
},
"conf_file": self.topdir + '/work/image-build/Server/docker_Fedora-Docker-Base.cfg',
@ -703,7 +703,7 @@ class TestCreateImageBuildThread(PungiTestCase):
'target': 'f24',
'disk_size': 3,
'name': 'Fedora-Docker-Base',
'arches': 'amd64,x86_64',
'arches': ['amd64', 'x86_64'],
'version': 'Rawhide',
'ksurl': 'git://git.fedorahosted.org/git/spin-kickstarts.git',
'distro': 'Fedora-20',
@ -743,6 +743,7 @@ class TestCreateImageBuildThread(PungiTestCase):
with mock.patch('time.sleep'):
t.process((compose, cmd), 1)
self.assertEqual(cmd['image_conf']['image-build']['arches'], 'amd64,x86_64')
self.assertItemsEqual(
koji_wrapper.get_image_build_cmd.call_args_list,
[mock.call(cmd['image_conf'],
@ -832,11 +833,11 @@ class TestCreateImageBuildThread(PungiTestCase):
'target': 'f24',
'disk_size': 3,
'name': 'Fedora-Docker-Base',
'arches': 'amd64,x86_64',
'arches': ['amd64', 'x86_64'],
'version': 'Rawhide',
'ksurl': 'git://git.fedorahosted.org/git/spin-kickstarts.git',
'distro': 'Fedora-20',
"can_fail": 'amd64,x86_64',
"can_fail": ['amd64', 'x86_64'],
}
},
"conf_file": 'amd64,x86_64-Client-Fedora-Docker-Base-docker',
@ -880,11 +881,11 @@ class TestCreateImageBuildThread(PungiTestCase):
'target': 'f24',
'disk_size': 3,
'name': 'Fedora-Docker-Base',
'arches': 'amd64,x86_64',
'arches': ['amd64', 'x86_64'],
'version': 'Rawhide',
'ksurl': 'git://git.fedorahosted.org/git/spin-kickstarts.git',
'distro': 'Fedora-20',
'can_fail': 'amd64,x86_64',
'can_fail': ['amd64', 'x86_64'],
}
},
"conf_file": 'amd64,x86_64-Client-Fedora-Docker-Base-docker',
@ -923,11 +924,11 @@ class TestCreateImageBuildThread(PungiTestCase):
'target': 'f24',
'disk_size': 3,
'name': 'Fedora-Docker-Base',
'arches': 'amd64,x86_64',
'arches': ['amd64', 'x86_64'],
'version': 'Rawhide',
'ksurl': 'git://git.fedorahosted.org/git/spin-kickstarts.git',
'distro': 'Fedora-20',
'can_fail': 'amd64',
'can_fail': ['amd64'],
}
},
"conf_file": 'amd64,x86_64-Client-Fedora-Docker-Base-docker',