Fix DefaultSubnetPool API test

As default subnetpool is a unique resource in the cloud, it needs to be
cleaned after each test is done. This patch adds a cleanup call to
DefaultSubnetPool tests in order to delete created default subnet pool.

Change-Id: I4c963d0d0e9910f7047061b51feb36c8a19de65c
Closes-bug: #1709938
This commit is contained in:
Jakub Libosvar 2017-08-10 17:04:45 +00:00
parent 34ad023ea3
commit 637734c1b6

View File

@ -336,6 +336,10 @@ class SubnetPoolsTest(SubnetPoolsTestBase):
class DefaultSubnetPoolsTest(SubnetPoolsTestBase):
def setUp(self):
self.addCleanup(self.resource_cleanup)
super(DefaultSubnetPoolsTest, self).setUp()
@classmethod
def resource_setup(cls):
super(DefaultSubnetPoolsTest, cls).resource_setup()