From 12ca930e459ce2b5487f8d2f9854069ed9d95cf1 Mon Sep 17 00:00:00 2001 From: Amit Uniyal Date: Tue, 16 Jan 2024 05:55:12 +0000 Subject: [PATCH] Updates glance fixture for create image glance client takes image_min_disk as string and return as int, while glance fixture is returning as it is. Change-Id: I47df4d147d9dd4c901af2c55c97e111e603cd806 --- nova/tests/fixtures/glance.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nova/tests/fixtures/glance.py b/nova/tests/fixtures/glance.py index b718f28c2a..b1124036d7 100644 --- a/nova/tests/fixtures/glance.py +++ b/nova/tests/fixtures/glance.py @@ -300,6 +300,10 @@ class GlanceFixture(fixtures.Fixture): image_meta = copy.deepcopy(metadata) + if image_meta.get('min_disk'): + # min_disk should be of int type only. + image_meta['min_disk'] = int(image_meta['min_disk']) + # Glance sets the size value when an image is created, so we # need to do that here to fake things out if it's not provided # by the caller. This is needed to avoid a KeyError in the