diff --git a/releasenotes/notes/fix-show-image-file-expected-code-92d97342d0f6d60e.yaml b/releasenotes/notes/fix-show-image-file-expected-code-92d97342d0f6d60e.yaml new file mode 100644 index 0000000000..a4050a5624 --- /dev/null +++ b/releasenotes/notes/fix-show-image-file-expected-code-92d97342d0f6d60e.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fix show_image_file interface in v2 ImagesClient: Bug#1756264. + The expected success code of show_image_file is changed from + ``200`` to ``[200, 204, 206]``. diff --git a/tempest/lib/services/image/v2/images_client.py b/tempest/lib/services/image/v2/images_client.py index bcdae44542..ed6df47799 100644 --- a/tempest/lib/services/image/v2/images_client.py +++ b/tempest/lib/services/image/v2/images_client.py @@ -161,7 +161,7 @@ class ImagesClient(rest_client.RestClient): """ url = 'images/%s/file' % image_id resp, body = self.get(url) - self.expected_success(200, resp.status) + self.expected_success([200, 204, 206], resp.status) return rest_client.ResponseBodyData(resp, body) def add_image_tag(self, image_id, tag):