Merge "[UT][ovn] Access config options after they are registered"
This commit is contained in:
commit
a6e7743838
neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver
@ -165,6 +165,7 @@ class TestOvnDbNotifyHandler(base.BaseTestCase):
|
||||
class TestOvnConnection(base.BaseTestCase):
|
||||
|
||||
def setUp(self):
|
||||
ovn_conf.register_opts()
|
||||
super(TestOvnConnection, self).setUp()
|
||||
|
||||
@mock.patch.object(idlutils, 'get_schema_helper')
|
||||
|
@ -158,6 +158,9 @@ class TestOVNMechanismDriverBase(MechDriverSetupBase,
|
||||
group='ovn')
|
||||
ovn_conf.cfg.CONF.set_override('dns_servers', ['8.8.8.8'],
|
||||
group='ovn')
|
||||
# Need to register here for 'vlan_transparent' config before
|
||||
# setting up test_plugin
|
||||
config.register_common_config_options()
|
||||
cfg.CONF.set_override('vlan_transparent', True)
|
||||
cfg.CONF.set_override('ovsdb_connection_timeout', 30, group='ovn')
|
||||
mock.patch.object(impl_idl_ovn.Backend, 'schema_helper').start()
|
||||
@ -2453,7 +2456,6 @@ class OVNMechanismDriverTestCase(MechDriverSetupBase,
|
||||
|
||||
def setUp(self):
|
||||
ovn_conf.register_opts()
|
||||
cfg.CONF.set_override('global_physnet_mtu', 1550)
|
||||
cfg.CONF.set_override('tenant_network_types',
|
||||
['geneve'],
|
||||
group='ml2')
|
||||
@ -2466,6 +2468,7 @@ class OVNMechanismDriverTestCase(MechDriverSetupBase,
|
||||
ovn_conf.cfg.CONF.set_override('dns_servers', ['8.8.8.8'], group='ovn')
|
||||
mock.patch.object(impl_idl_ovn.Backend, 'schema_helper').start()
|
||||
super(OVNMechanismDriverTestCase, self).setUp()
|
||||
cfg.CONF.set_override('global_physnet_mtu', 1550)
|
||||
# Make sure the node and target_node for the hash ring in the
|
||||
# mechanism driver matches
|
||||
node_uuid = uuidutils.generate_uuid()
|
||||
|
Loading…
x
Reference in New Issue
Block a user