Heat SwiftResources : only count containers created by Tempest
Some containers in the demo tenant could be there before the Tempest
run so we should exclude them when we count containers created by
the stack.
Change-Id: I20ae92e8cc2b61197774963d049fd8231dafdb56
Closes-Bug: 1360832
diff --git a/tempest/api/orchestration/stacks/test_swift_resources.py b/tempest/api/orchestration/stacks/test_swift_resources.py
index cbe62a1..d7c2a0d 100644
--- a/tempest/api/orchestration/stacks/test_swift_resources.py
+++ b/tempest/api/orchestration/stacks/test_swift_resources.py
@@ -66,9 +66,9 @@
params = {'format': 'json'}
_, container_list = \
self.account_client.list_account_containers(params=params)
- self.assertEqual(2, len(container_list))
- for cont in container_list:
- self.assertTrue(cont['name'].startswith(self.stack_name))
+ created_containers = [cont for cont in container_list
+ if cont['name'].startswith(self.stack_name)]
+ self.assertEqual(2, len(created_containers))
@test.services('object_storage')
def test_acl(self):