Update /version endpoint to add components

* Include OCI and conmon information as components

Fixes #11227

Signed-off-by: Jhon Honce <jhonce@redhat.com>
This commit is contained in:
Jhon Honce
2021-08-19 14:19:45 -07:00
parent f988cfe146
commit fd32c73e3a
3 changed files with 45 additions and 12 deletions

View File

@ -70,6 +70,15 @@ class SystemTestCase(APITestCase):
r = requests.get(self.uri("/version"))
self.assertEqual(r.status_code, 200, r.text)
body = r.json()
names = [d.get("Name", "") for d in body["Components"]]
self.assertIn("Conmon", names)
for n in names:
if n.startswith("OCI Runtime"):
oci_name = n
self.assertIsNotNone(oci_name, "OCI Runtime not found in version components.")
def test_df(self):
r = requests.get(self.podman_url + "/v1.40/system/df")
self.assertEqual(r.status_code, 200, r.text)