diff --git a/tempest/api/object_storage/test_account_services.py b/tempest/api/object_storage/test_account_services.py index 6bab9b30e3..5983c1f281 100644 --- a/tempest/api/object_storage/test_account_services.py +++ b/tempest/api/object_storage/test_account_services.py @@ -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):