From 748d4fdaf62667f39ce65e5053792b54dd684698 Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Wed, 30 Jul 2014 18:07:04 +0900 Subject: [PATCH] test_l3_plugin: L3AgentDbInteTestCase L3AgentDbSepTestCase fails L3AgentDbInteTestCase and L3AgentDbSepTestCase fails when they are run independently without other test case. something like tox -e py27 neutron.tests.unit.test_l3_plugin It's because necessary oslo.config options aren't properly initialized when instantiating service plugin. Initialize config before instantiating plugin. Change-Id: Ic6dd28e3caf8b9e3322bf2df99e67adb138cb234 Closes-Bug: #1350252 --- neutron/tests/unit/test_l3_plugin.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/neutron/tests/unit/test_l3_plugin.py b/neutron/tests/unit/test_l3_plugin.py index c1a62ae1d..bcb1aedd5 100644 --- a/neutron/tests/unit/test_l3_plugin.py +++ b/neutron/tests/unit/test_l3_plugin.py @@ -2057,10 +2057,9 @@ class L3AgentDbIntTestCase(L3BaseForIntTests, L3AgentDbTestCaseBase): """ def setUp(self): + super(L3AgentDbIntTestCase, self).setUp() self.core_plugin = TestL3NatIntPlugin() - # core plugin is also plugin providing L3 routing self.plugin = self.core_plugin - super(L3AgentDbIntTestCase, self).setUp() class L3AgentDbSepTestCase(L3BaseForSepTests, L3AgentDbTestCaseBase): @@ -2070,10 +2069,9 @@ class L3AgentDbSepTestCase(L3BaseForSepTests, L3AgentDbTestCaseBase): """ def setUp(self): + super(L3AgentDbSepTestCase, self).setUp() self.core_plugin = TestNoL3NatPlugin() - # core plugin is also plugin providing L3 routing self.plugin = TestL3NatServicePlugin() - super(L3AgentDbSepTestCase, self).setUp() class L3NatDBIntTestCase(L3BaseForIntTests, L3NatTestCaseBase): -- 2.45.2