mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-02 20:59:06 +08:00
provide missing fields in api
This commit is contained in:
@@ -785,9 +785,11 @@ class ModuleBuild(MBSBase):
|
||||
buildrequires = xmd.get("mbs", {}).get("buildrequires", {})
|
||||
rv = self.short_json()
|
||||
rv.update({
|
||||
"batch": self.batch,
|
||||
"component_builds": [build.id for build in self.component_builds],
|
||||
"koji_tag": self.koji_tag,
|
||||
"owner": self.owner,
|
||||
"new_repo_task_id": self.new_repo_task_id,
|
||||
"rebuild_strategy": self.rebuild_strategy,
|
||||
"scmurl": self.scmurl,
|
||||
"srpms": json.loads(self.srpms or "[]"),
|
||||
@@ -818,6 +820,7 @@ class ModuleBuild(MBSBase):
|
||||
rv.update({
|
||||
"base_module_buildrequires": [br.short_json(True, False) for br in self.buildrequires],
|
||||
"build_context": self.build_context,
|
||||
"build_context_no_bms": self.build_context_no_bms,
|
||||
"modulemd": self.modulemd,
|
||||
"reused_module_id": self.reused_module_id,
|
||||
"runtime_context": self.runtime_context,
|
||||
|
||||
@@ -261,11 +261,13 @@ class TestQueryModuleBuild:
|
||||
items = json.loads(rv.data)["items"]
|
||||
expected = [
|
||||
{
|
||||
"batch": 0,
|
||||
"component_builds": [11, 12],
|
||||
"context": "00000000",
|
||||
"id": 7,
|
||||
"koji_tag": None,
|
||||
"name": "testmodule",
|
||||
'new_repo_task_id': None,
|
||||
"owner": "some_other_user",
|
||||
"rebuild_strategy": "changed-and-after",
|
||||
"scmurl": (
|
||||
@@ -302,11 +304,13 @@ class TestQueryModuleBuild:
|
||||
"buildrequires": {},
|
||||
},
|
||||
{
|
||||
"batch": 2,
|
||||
"component_builds": [9, 10],
|
||||
"context": "00000000",
|
||||
"id": 6,
|
||||
"koji_tag": "module-postgressql-1.2",
|
||||
"name": "postgressql",
|
||||
'new_repo_task_id': None,
|
||||
"owner": "some_user",
|
||||
"rebuild_strategy": "changed-and-after",
|
||||
"scmurl": (
|
||||
@@ -476,11 +480,13 @@ class TestQueryModuleBuild:
|
||||
|
||||
expected = [
|
||||
{
|
||||
"batch": 2,
|
||||
"component_builds": [cb.id for cb in component_build_ids],
|
||||
"context": "3a4057d2",
|
||||
"id": checking_build_id,
|
||||
"koji_tag": "module-nginx-1.2",
|
||||
"name": "nginx",
|
||||
'new_repo_task_id': None,
|
||||
"owner": "Moe Szyslak",
|
||||
"rebuild_strategy": "changed-and-after",
|
||||
"scmurl": (
|
||||
|
||||
Reference in New Issue
Block a user