Add missing test for the object storage v1 API

This commit adds a missing test case for the object storage v1 API,
the missing test is for listing account containers filtering the list
using the prefix parameter.

Change-Id: Icaf73aa88d86f92a09ff912148478031d487768b
Partial-Bug: 1086590
This commit is contained in:
Castulo J. Martinez 2016-05-18 10:41:00 -07:00
parent ba38e3878a
commit 947d23344c

View File

@ -226,6 +226,17 @@ class AccountTest(base.BaseObjectTest):
self.assertEqual(len(container_list),
min(limit, self.containers_count - 2))
@test.idempotent_id('365e6fc7-1cfe-463b-a37c-8bd08d47b6aa')
def test_list_containers_with_prefix(self):
# list containers that have a name that starts with a prefix
prefix = '{0}-a'.format(CONF.resources_prefix)
params = {'prefix': prefix}
resp, container_list = self.account_client.list_account_containers(
params=params)
self.assertHeaders(resp, 'Account', 'GET')
for container in container_list:
self.assertEqual(True, container.startswith(prefix))
@test.attr(type='smoke')
@test.idempotent_id('4894c312-6056-4587-8d6f-86ffbf861f80')
def test_list_account_metadata(self):