This patch removes some of the fullstack test cases which aren't really needed because they are either testing some use cases covered already by scenario tests or some other common tests. Removed tests: * TestOvsConnectivitySameNetwork.test_connectivity - basic connectivity test covered by many other test cases, * TestDhcpAgentNoHA.test_dhcp_assignment - basic test checking if network was assigned to the DHCP agent - it's tested by many other tests, * TestLegacyL3Agent.test_namespace_exists - test which only checks that qrouter namespace was created by the L3 agent, not needed really, * TestLegacyL3Agent.test_east_west_traffic - covered already by many scenario test cases, * TestLegacyL3Agent.test_north_south_traffic - covered already by many scenario test cases, * TestBwLimitQoS.test_bw_limit_qos_policy_rule_lifecycle - covered already by neutron-tempest-plugin scenario test, * TestQoSWithL2Population - trivial test which isn't needed really, * SecurityGroupRulesTest.test_security_group_rule_quota - already covered by the neutron-tempest-plugin admin api test cases, * TestSubnet.test_create_subnet_ipv4 - already tested in many scenario test cases, * TestSubnet.test_create_subnet_ipv6_slaac - already tested in tempest scenario test case, * TestTrunkPlugin.test_trunk_lifecycle - already covered by the scenario test from the neutron-tempest-plugin Additionally this patch removes monkeypatching of the init_handler method from the neutron-ovs-agent. It was needed only due to the trunk ports test and is not needed anymore. Change-Id: Ifa438d30599ad7e627c85c772ffae9ae9226f7ea
57 lines
1.8 KiB
Python
Executable File
57 lines
1.8 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
# Copyright 2017 OVH SAS
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
import sys
|
|
from unittest import mock
|
|
|
|
from oslo_config import cfg
|
|
|
|
from neutron.agent.common import ovs_lib
|
|
from neutron.agent.common import polling
|
|
from neutron.agent.l2.extensions import qos as qos_extension
|
|
from neutron.common import config
|
|
from neutron.tests.common.agents import ovs_agent
|
|
|
|
|
|
def monkeypatch_qos():
|
|
mock.patch.object(ovs_lib.OVSBridge, 'clear_bandwidth_qos').start()
|
|
if "qos" in cfg.CONF.service_plugins:
|
|
mock.patch.object(qos_extension.QosAgentExtension,
|
|
'_process_reset_port').start()
|
|
|
|
|
|
def monkeypatch_event_filtering():
|
|
def filter_bridge_names(br_names):
|
|
if 'trunk' in cfg.CONF.service_plugins:
|
|
return []
|
|
return br_names
|
|
|
|
polling.filter_bridge_names = filter_bridge_names
|
|
|
|
|
|
def main():
|
|
# TODO(slaweq): this monkepatch will not be necessary when
|
|
# https://review.opendev.org/#/c/506722/ will be merged and ovsdb-server
|
|
# ovs-vswitchd processes for each test will be isolated in separate
|
|
# namespace
|
|
config.register_common_config_options()
|
|
monkeypatch_qos()
|
|
monkeypatch_event_filtering()
|
|
ovs_agent.main()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|