test/python/docker: fix swagger check

The moby swagger.yaml was changed to quote HTTP status codes as string
as part of moby commit 79658025a2fd.
Thus fix the key lookup here to use a string as well.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger committed 2026-10-02 12:46:55 +02:00
1 parent 7774a975a3
commit 8fa7fb13ec
1 file changed
+1 -1
+1 -1
View File
@@ -318,7 +318,7 @@ class TestContainers(common.DockerTestCase):
try:
spec = yaml.load(open("vendor/github.com/moby/moby/api/swagger.yaml").read(), Loader=yaml.Loader)
ctr_inspect = json.loads(self.podman.run("inspect", ctr.id).stdout)[0]
schema = spec['paths']["/containers/{id}/json"]["get"]['responses'][200]['schema']
schema = spec['paths']["/containers/{id}/json"]["get"]['responses']['200']['schema']
schema["definitions"] = spec["definitions"]
OAS31Validator.check_schema(schema)