From a4ec5479d743742470e7002013f9bedd8af86d1e Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Fri, 13 Dec 2024 14:53:57 +0000 Subject: [PATCH] [OVN] Use the MySQL backend for the ``TestOvnNbSync`` tests (2) In [1] it was tried to define MySQL as backend for the ``TestOvnNbSync`` tests. This patch finishes this wrong attempt and checks the result. [1]https://review.opendev.org/c/openstack/neutron/+/935804 Closes-Bug: #2088423 Change-Id: Ibaeaa36dbbb9def10a163b4ee071cb432db5a383 (cherry picked from commit fa1dfd81c31beefb8eec9967580edf12305978e4) --- .../ml2/drivers/ovn/mech_driver/ovsdb/test_ovn_db_sync.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovn_db_sync.py b/neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovn_db_sync.py index af81d82ee19..6df817e2586 100644 --- a/neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovn_db_sync.py +++ b/neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovn_db_sync.py @@ -27,6 +27,7 @@ from neutron_lib.services.qos import constants as qos_const from oslo_utils import uuidutils from ovsdbapp.backend.ovs_idl import idlutils from ovsdbapp import constants as ovsdbapp_const +from sqlalchemy.dialects.mysql import dialect as mysql_dialect from neutron.common.ovn import acl as acl_utils from neutron.common.ovn import constants as ovn_const @@ -46,13 +47,14 @@ from neutron.tests.unit.extensions import test_securitygroup from neutron.tests.unit import testlib_api -class TestOvnNbSync(base.TestOVNFunctionalBase, - testlib_api.MySQLTestCaseMixin): +class TestOvnNbSync(testlib_api.MySQLTestCaseMixin, + base.TestOVNFunctionalBase): _extension_drivers = ['port_security', 'dns', 'qos', 'revision_plugin'] def setUp(self, *args): super(TestOvnNbSync, self).setUp(maintenance_worker=True) + self.assertEqual(mysql_dialect.name, self.db.engine.dialect.name) ovn_config.cfg.CONF.set_override('dns_domain', 'ovn.test') ext_mgr = test_extraroute.ExtraRouteTestExtensionManager() self.ext_api = test_extensions.setup_extensions_middleware(ext_mgr)