Address bug 1839794 on the Volume show version client
Bug https://bugs.launchpad.net/tempest/+bug/1839794
found out that the volume version_show client that
was not used had a defect when builing the URL.
Used the same direction that the compute version client
did to strip off the version and project info and add
back the version.[0] Also added a Volume v3 test using the
client.
[0] https://github.com/openstack/tempest/blob/master/tempest/lib/services/compute/versions_client.py#L40
Change-Id: I9be99f5fc0eab3de125ce69415a0be65b1c4ad0d
Closes-Bug: #1839794
diff --git a/tempest/api/volume/test_versions.py b/tempest/api/volume/test_versions.py
index b4d48db..b602032 100644
--- a/tempest/api/volume/test_versions.py
+++ b/tempest/api/volume/test_versions.py
@@ -27,3 +27,15 @@
# with JSON-Schema validation. It is enough to just call
# the API here.
self.versions_client.list_versions()
+
+ @decorators.idempotent_id('7f755ae2-caa9-4049-988c-331d8f7a579f')
+ def test_show_version(self):
+ # NOTE: The version data is checked on service client side
+ # with JSON-Schema validation. So we will loop through each
+ # version and call show version.
+ versions = self.versions_client.list_versions()['versions']
+ for version_dict in versions:
+ version = version_dict['id']
+ major_version = version.split('.')[0]
+ response = self.versions_client.show_version(major_version)
+ self.assertEqual(version, response['versions'][0]['id'])