Merge "Clean up all secrets in functional tests"
This commit is contained in:
commit
f008a7b0c1
|
@ -90,5 +90,8 @@ class ContainerBehaviors(base_behaviors.BaseBehaviors):
|
|||
|
||||
def delete_all_created_containers(self):
|
||||
"""Delete all containers that we created"""
|
||||
for href in self.container_hrefs_to_delete:
|
||||
# Create a copy of the list -- otherwise delete_container will remove
|
||||
# items from the list as we are iterating over it
|
||||
containers_to_delete = list(self.container_hrefs_to_delete)
|
||||
for href in containers_to_delete:
|
||||
self.delete_container(href)
|
||||
|
|
|
@ -141,5 +141,8 @@ class SecretBehaviors(base_behaviors.BaseBehaviors):
|
|||
|
||||
def delete_all_created_secrets(self):
|
||||
"""Delete all secrets that we created"""
|
||||
for href in self.secret_hrefs_to_delete:
|
||||
# Create a copy of the list -- otherwise delete_secret will remove
|
||||
# items from the list as we are iterating over it
|
||||
secrets_to_delete = list(self.secret_hrefs_to_delete)
|
||||
for href in secrets_to_delete:
|
||||
self.delete_secret(href)
|
||||
|
|
|
@ -136,7 +136,6 @@ class ACLTestCase(CmdLineTestCase):
|
|||
secret_ref = self.secret_behaviors.store_secret()
|
||||
container_ref = self.container_behaviors.create_container(
|
||||
secret_hrefs=[secret_ref])
|
||||
secret_ref = self.secret_behaviors.store_secret()
|
||||
|
||||
data = self.acl_behaviors.acl_submit(entity_ref=container_ref,
|
||||
project_access=False,
|
||||
|
|
|
@ -28,6 +28,7 @@ class ContainerTestCase(CmdLineTestCase):
|
|||
|
||||
def tearDown(self):
|
||||
super(ContainerTestCase, self).tearDown()
|
||||
self.secret_behaviors.delete_all_created_secrets()
|
||||
self.container_behaviors.delete_all_created_containers()
|
||||
|
||||
@testcase.attr('positive')
|
||||
|
|
Loading…
Reference in New Issue