From 637734c1b6d5a158374576ce27941a04363fc8bb Mon Sep 17 00:00:00 2001 From: Jakub Libosvar Date: Thu, 10 Aug 2017 17:04:45 +0000 Subject: [PATCH] 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 --- neutron/tests/tempest/api/test_subnetpools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neutron/tests/tempest/api/test_subnetpools.py b/neutron/tests/tempest/api/test_subnetpools.py index a2d4fe8792b..e2fb3d653b4 100644 --- a/neutron/tests/tempest/api/test_subnetpools.py +++ b/neutron/tests/tempest/api/test_subnetpools.py @@ -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()