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 2026-10-02 12:46:55 +02:00
parent 7774a975a3
commit 8fa7fb13ec
No known key found for this signature in database
GPG key ID: EB145DD938A3CAF2

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)