Skip to content

Commit bb414fb

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Add functional test for image stores list"
2 parents 1aa3f7e + e89a03d commit bb414fb

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

openstackclient/tests/functional/image/v2/test_info.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# under the License.
1515

1616
from openstackclient.tests.functional.image import base
17+
from tempest.lib import exceptions
1718

1819

1920
class InfoTests(base.BaseImageTests):
@@ -28,3 +29,22 @@ def tearDown(self):
2829
def test_image_import_info(self):
2930
output = self.openstack('image import info', parse_output=True)
3031
self.assertIsNotNone(output['import-methods'])
32+
33+
def test_image_stores_list(self):
34+
try:
35+
output = self.openstack(
36+
'image stores list',
37+
parse_output=True,
38+
)
39+
except exceptions.CommandFailed as e:
40+
msg = str(e.stdout or '') + str(e.stderr or '')
41+
if "Multi Backend support not enabled" in msg:
42+
self.skipTest("Multi Backend support not enabled")
43+
raise
44+
45+
self.assertIsInstance(output, list)
46+
if output:
47+
self.assert_table_structure(
48+
output,
49+
['ID', 'Description', 'Default'],
50+
)

0 commit comments

Comments
 (0)