Tests object_storage extension listing
This patch adds the feature to list extensions to the object_storage
account_client and then adds one test to validates it works.
This is a first step in view of adding this feature to the config
validation script.
Partially implements config-verification
Change-Id: I8ff31a761d82ea4b7b09307ae1d51108d7f6911e
diff --git a/tempest/api/object_storage/test_account_services.py b/tempest/api/object_storage/test_account_services.py
index 12c823b..4f1e26b 100644
--- a/tempest/api/object_storage/test_account_services.py
+++ b/tempest/api/object_storage/test_account_services.py
@@ -18,6 +18,7 @@
import random
from tempest.api.object_storage import base
+from tempest.common import custom_matchers
from tempest.common.utils import data_utils
from tempest import exceptions
from tempest.test import attr
@@ -54,6 +55,13 @@
self.assertIn(container_name, container_names)
@attr(type='smoke')
+ def test_list_extensions(self):
+ resp, extensions = self.account_client.list_extensions()
+
+ self.assertIn(int(resp['status']), HTTP_SUCCESS)
+ self.assertThat(resp, custom_matchers.AreAllWellFormatted())
+
+ @attr(type='smoke')
def test_list_containers_with_limit(self):
# list containers one of them, half of them then all of them
for limit in (1, self.containers_count / 2, self.containers_count):
diff --git a/tempest/services/object_storage/account_client.py b/tempest/services/object_storage/account_client.py
index 94b55c3..aa406ee 100644
--- a/tempest/services/object_storage/account_client.py
+++ b/tempest/services/object_storage/account_client.py
@@ -95,6 +95,14 @@
body = json.loads(body)
return resp, body
+ def list_extensions(self):
+ _base_url = self.base_url
+ self.base_url = "/".join(self.base_url.split("/")[:-2])
+ resp, body = self.get('info')
+ self.base_url = _base_url
+ body = json.loads(body)
+ return resp, body
+
class AccountClientCustomizedHeader(RestClient):