[osbs] Convert build_id to int
The getBuild API call expects either an integer or string NVR, otherwise it will crash. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
1a4e1b211c
commit
c05282be44
|
@ -89,7 +89,7 @@ class OSBSThread(WorkerThread):
|
||||||
def _add_metadata(self, koji_proxy, variant, task_id):
|
def _add_metadata(self, koji_proxy, variant, task_id):
|
||||||
# Create metadata
|
# Create metadata
|
||||||
result = koji_proxy.getTaskResult(task_id)
|
result = koji_proxy.getTaskResult(task_id)
|
||||||
build_id = result['koji_builds'][0]
|
build_id = int(result['koji_builds'][0])
|
||||||
buildinfo = koji_proxy.getBuild(build_id)
|
buildinfo = koji_proxy.getBuild(build_id)
|
||||||
archives = koji_proxy.listArchives(build_id)
|
archives = koji_proxy.listArchives(build_id)
|
||||||
|
|
||||||
|
|
|
@ -209,8 +209,8 @@ class OSBSThreadTest(helpers.PungiTestCase):
|
||||||
mock.call.watch_task(
|
mock.call.watch_task(
|
||||||
12345, self.topdir + '/logs/global/osbs/Server-1-watch-task.log'),
|
12345, self.topdir + '/logs/global/osbs/Server-1-watch-task.log'),
|
||||||
mock.call.koji_proxy.getTaskResult(12345),
|
mock.call.koji_proxy.getTaskResult(12345),
|
||||||
mock.call.koji_proxy.getBuild('54321'),
|
mock.call.koji_proxy.getBuild(54321),
|
||||||
mock.call.koji_proxy.listArchives('54321')])
|
mock.call.koji_proxy.listArchives(54321)])
|
||||||
|
|
||||||
def _assertRepoFile(self):
|
def _assertRepoFile(self):
|
||||||
with open(self.topdir + '/work/global/tmp-Server/compose-rpms-1.repo') as f:
|
with open(self.topdir + '/work/global/tmp-Server/compose-rpms-1.repo') as f:
|
||||||
|
|
Loading…
Reference in New Issue