Mock OVSBrdge.clear_minimum_bandwidth_qos in fullstack tests
This function will not be executed when the OVS agent is started,
in order to keep QoS and Queue registers in OVS BD created by other
tests.
Change-Id: I054510403a4f46544ff78ee2f6babb1247726553
Closes-Bug: #1819125
(cherry picked from commit 531fdc336b
)
This commit is contained in:
parent
f6652f0ee6
commit
f77089aca8
|
@ -15,8 +15,10 @@
|
|||
|
||||
import sys
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
|
||||
from neutron.agent.common import ovs_lib
|
||||
from neutron.services.trunk.drivers.openvswitch.agent \
|
||||
import driver as trunk_driver
|
||||
from neutron.tests.common.agents import ovs_agent
|
||||
|
@ -42,7 +44,8 @@ def main():
|
|||
# ovs-vswitchd processes for each test will be isolated in separate
|
||||
# namespace
|
||||
monkeypatch_init_handler()
|
||||
ovs_agent.main()
|
||||
with mock.patch.object(ovs_lib.OVSBridge, 'clear_minimum_bandwidth_qos'):
|
||||
ovs_agent.main()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -23,7 +23,6 @@ import testscenarios
|
|||
from neutron.agent.common import ovs_lib
|
||||
from neutron.agent.linux import tc_lib
|
||||
from neutron.common import utils
|
||||
from neutron.tests import base as tests_base
|
||||
from neutron.tests.common.agents import l2_extensions
|
||||
from neutron.tests.fullstack import base
|
||||
from neutron.tests.fullstack.resources import environment
|
||||
|
@ -630,7 +629,6 @@ class _TestMinBwQoS(BaseQoSRuleTestCase):
|
|||
rule['qos_policy_id'] = qos_policy_id
|
||||
qos_policy['rules'].append(rule)
|
||||
|
||||
@tests_base.unstable_test('bug 1819125')
|
||||
def test_min_bw_qos_policy_rule_lifecycle(self):
|
||||
new_limit = MIN_BANDWIDTH - 100
|
||||
|
||||
|
@ -680,7 +678,6 @@ class TestMinBwQoSOvs(_TestMinBwQoS, base.BaseFullStackTestCase):
|
|||
self.fail('"%s" direction not implemented'
|
||||
% constants.INGRESS_DIRECTION)
|
||||
|
||||
@tests_base.unstable_test('bug 1819125')
|
||||
def test_bw_limit_qos_port_removed(self):
|
||||
"""Test if rate limit config is properly removed when whole port is
|
||||
removed.
|
||||
|
|
Loading…
Reference in New Issue