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.

This is breaking python 3.11 on Debian, not possible to test
in the gate at the moment.

Closes-Bug: #1996527

Change-Id: Ie579df7126ca8d09dbedad8d2254c79ec0d3bc32
This commit is contained in:
Brian Haley 2022-11-14 18:06:20 -05:00
parent 320f54eba1
commit c5ee9f3495
1 changed files with 2 additions and 0 deletions

View File

@ -2707,6 +2707,7 @@ class TestOVNMechanismDriverSubnetsV2(test_plugin.TestMl2SubnetsV2,
OVNMechanismDriverTestCase):
def setUp(self):
ovn_conf.register_opts()
# Disable metadata so that we don't interfere with existing tests
# in Neutron tree. Doing this because some of the tests assume that
# first IP address in a subnet will be available and this is not true
@ -2760,6 +2761,7 @@ class TestOVNMechanismDriverPortsV2(test_plugin.TestMl2PortsV2,
OVNMechanismDriverTestCase):
def setUp(self):
ovn_conf.register_opts()
# Disable metadata so that we don't interfere with existing tests
# in Neutron tree. Doing this because some of the tests assume that
# first IP address in a subnet will be available and this is not true