Load the required configuration options in the UT classes

Some test classes are not loading the required configuration options
during the setup process. That prevents from launching thoses tests
or classes individually. This patch solves this issue by importing the
required options in the "setUp" test class method.

Closes-Bug: #1993502
Change-Id: I79bf7fa85c7b29fa37f81feb51f3eb68cef3bdee
This commit is contained in:
Rodolfo Alonso Hernandez 2022-10-06 07:14:06 +02:00
parent 100abfc043
commit 7b8b797dea
2 changed files with 2 additions and 0 deletions

View File

@ -3671,6 +3671,7 @@ class TestOVNMechanismDriverSecurityGroup(MechDriverSetupBase,
_extension_drivers = ['port_security']
def setUp(self):
ovn_conf.register_opts()
cfg.CONF.set_override('extension_drivers',
self._extension_drivers,
group='ml2')

View File

@ -1733,6 +1733,7 @@ class OVNL3ExtrarouteTests(test_l3_gw.ExtGwModeIntTestCase,
plugin = 'neutron.tests.unit.extensions.test_l3.TestNoL3NatPlugin'
l3_plugin = ('neutron.services.ovn_l3.plugin.OVNL3RouterPlugin')
service_plugins = {'l3_plugin_name': l3_plugin}
config.register_opts()
cfg.CONF.set_default('max_routes', 3)
ext_mgr = test_extraroute.ExtraRouteTestExtensionManager()
super(test_l3.L3BaseForIntTests, self).setUp(