Clean up a stray secret in the functional tests
The order_delete smoke test deleted the order, but not the secret. Change-Id: I1ceb6ec025412af54ba21d78922063d12f188eb3
This commit is contained in:
parent
ee3675cfb1
commit
76563b5608
@ -19,6 +19,7 @@ from testtools import testcase
|
|||||||
from barbican.tests import utils
|
from barbican.tests import utils
|
||||||
from functionaltests.api import base
|
from functionaltests.api import base
|
||||||
from functionaltests.api.v1.behaviors import order_behaviors
|
from functionaltests.api.v1.behaviors import order_behaviors
|
||||||
|
from functionaltests.api.v1.behaviors import secret_behaviors
|
||||||
from functionaltests.api.v1.models import order_models
|
from functionaltests.api.v1.models import order_models
|
||||||
|
|
||||||
|
|
||||||
@ -58,6 +59,7 @@ class OrdersTestCase(base.TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(OrdersTestCase, self).setUp()
|
super(OrdersTestCase, self).setUp()
|
||||||
self.behaviors = order_behaviors.OrderBehaviors(self.client)
|
self.behaviors = order_behaviors.OrderBehaviors(self.client)
|
||||||
|
self.secret_behaviors = secret_behaviors.SecretBehaviors(self.client)
|
||||||
|
|
||||||
self.create_default_data = get_default_order_create_data()
|
self.create_default_data = get_default_order_create_data()
|
||||||
self.create_all_none_data = get_default_order_create_all_none_data()
|
self.create_all_none_data = get_default_order_create_all_none_data()
|
||||||
@ -152,9 +154,16 @@ class OrdersTestCase(base.TestCase):
|
|||||||
self.assertEqual(202, create_resp.status_code)
|
self.assertEqual(202, create_resp.status_code)
|
||||||
self.assertIsNotNone(order_ref)
|
self.assertIsNotNone(order_ref)
|
||||||
|
|
||||||
|
# get the secret ref
|
||||||
|
order_resp = self.behaviors.get_order(order_ref)
|
||||||
|
secret_ref = order_resp.model.secret_ref
|
||||||
|
|
||||||
# delete the order
|
# delete the order
|
||||||
delete_resp = self.behaviors.delete_order(order_ref)
|
delete_resp = self.behaviors.delete_order(order_ref)
|
||||||
|
|
||||||
|
# clean up the secret that was created
|
||||||
|
self.secret_behaviors.delete_secret(secret_ref)
|
||||||
|
|
||||||
# verify the delete
|
# verify the delete
|
||||||
self.assertEqual(204, delete_resp.status_code)
|
self.assertEqual(204, delete_resp.status_code)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user