blob: ef913546659d852bdb7a7b56dac5770d091b8344 [file] [log] [blame]
Ken'ichi Ohmichif72343e2017-03-10 12:53:14 -08001# Copyright 2017 NEC Corporation. All rights reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15from tempest.api.image import base
16from tempest.lib import decorators
Ken'ichi Ohmichif72343e2017-03-10 12:53:14 -080017
18
19class VersionsTest(base.BaseV2ImageTest):
zhufle68f4352020-04-21 13:44:55 +080020 """Test image versions"""
Ken'ichi Ohmichif72343e2017-03-10 12:53:14 -080021
22 @decorators.idempotent_id('659ea30a-a17c-4317-832c-0f68ed23c31d')
Jordan Pittier3b46d272017-04-12 16:17:28 +020023 @decorators.attr(type='smoke')
Ken'ichi Ohmichif72343e2017-03-10 12:53:14 -080024 def test_list_versions(self):
zhufle68f4352020-04-21 13:44:55 +080025 """Test listing image versions"""
Ken'ichi Ohmichif72343e2017-03-10 12:53:14 -080026 versions = self.versions_client.list_versions()['versions']
27 expected_resources = ('id', 'links', 'status')
28
29 for version in versions:
30 for res in expected_resources:
31 self.assertIn(res, version)