From: Terry Wilson Date: Thu, 22 Jan 2015 09:52:33 +0000 (-0600) Subject: Prepare to functionally test OVSDB interfaces X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b0108fb8b409a3feadf91c82b3a455a21e08a58a;p=openstack-build%2Fneutron-build.git Prepare to functionally test OVSDB interfaces When the OVSDB interface is added, make it easy to run all ovs-related functional tests against both interfaces. Partially-Implements: blueprint vsctl-to-ovsdb Change-Id: Iadff4ec8c44be61861a2358745c7b08dc8985d26 --- diff --git a/neutron/tests/functional/agent/linux/base.py b/neutron/tests/functional/agent/linux/base.py index 40364c3f0..eed655780 100644 --- a/neutron/tests/functional/agent/linux/base.py +++ b/neutron/tests/functional/agent/linux/base.py @@ -14,6 +14,7 @@ import netaddr from oslo_config import cfg +import testscenarios from neutron.agent.common import config from neutron.agent.linux import ip_lib @@ -114,9 +115,17 @@ class BaseLinuxTestCase(functional_base.BaseSudoTestCase): return str(net) -class BaseOVSLinuxTestCase(BaseLinuxTestCase): +# Regarding MRO, it goes BaseOVSLinuxTestCase, WithScenarios, +# BaseLinuxTestCase, ..., UnitTest, object. setUp is not dfined in +# WithScenarios, so it will correctly be found in BaseLinuxTestCase. +class BaseOVSLinuxTestCase(testscenarios.WithScenarios, BaseLinuxTestCase): + scenarios = [ + ('vsctl', dict(ovsdb_interface='vsctl')), + ] + def setUp(self): super(BaseOVSLinuxTestCase, self).setUp() + self.config(group='OVS', ovsdb_interface=self.ovsdb_interface) self.ovs = ovs_lib.BaseOVS(self.root_helper) self.ip = ip_lib.IPWrapper(self.root_helper)