Expose the NVR of component builds in the API to help future debugging

This commit is contained in:
mprahl
2018-08-06 19:42:37 -04:00
parent a78c564073
commit 8a54b26fd7
3 changed files with 6 additions and 0 deletions

View File

@@ -559,6 +559,7 @@ about the referenced component build.
"format": "rpms",
"id": 854,
"module_build": 42,
"nvr": "pth-1-1",
"package": "pth",
"state": 1,
"state_name": "COMPLETE",
@@ -571,6 +572,7 @@ The response includes:
- ``id`` - the ID of the component build.
- ``format`` - typically "rpms".
- ``nvr`` - the NVR of the component build.
- ``package`` - the package name.
- ``state`` - the numerical state of the component build.
- ``state_name`` - the named component build state and can be "COMPLETE",

View File

@@ -721,6 +721,7 @@ class ComponentBuild(MBSBase):
'state': self.state,
'state_reason': self.state_reason,
'module_build': self.module_id,
'nvr': self.nvr
}
try:

View File

@@ -444,6 +444,7 @@ class TestViews:
assert data['id'] == 1
assert data['format'] == 'rpms'
assert data['module_build'] == 2
assert data['nvr'] == 'nginx-1.10.1-2.module+2+b8661ee4'
assert data['package'] == 'nginx'
assert data['state'] == 1
assert data['state_name'] == 'COMPLETE'
@@ -456,6 +457,7 @@ class TestViews:
assert data['id'] == 1
assert data['format'] == 'rpms'
assert data['module_build'] == 2
assert data['nvr'] == 'nginx-1.10.1-2.module+2+b8661ee4'
assert data['package'] == 'nginx'
assert data['state'] == 1
assert data['state_name'] == 'COMPLETE'
@@ -468,6 +470,7 @@ class TestViews:
assert data['id'] == 3
assert data['format'] == 'rpms'
assert data['module_build'] == 3
assert data['nvr'] == 'postgresql-9.5.3-4.module+3+0557c87d'
assert data['package'] == 'postgresql'
assert data['state'] == 1
assert data['state_name'] == 'COMPLETE'