Merge "Enable test_agent_ovs_cleanup to be run alone"
This commit is contained in:
commit
a97911d404
@ -36,6 +36,17 @@ class TestOVSCleanup(unittest.TestCase):
|
|||||||
mock_get_bridges.return_value = ['br-int', 'br-ex']
|
mock_get_bridges.return_value = ['br-int', 'br-ex']
|
||||||
with mock.patch(
|
with mock.patch(
|
||||||
'quantum.agent.linux.ovs_lib.OVSBridge') as ovs:
|
'quantum.agent.linux.ovs_lib.OVSBridge') as ovs:
|
||||||
util.main()
|
setup_conf = mock.patch(
|
||||||
ovs.assert_has_calls([mock.call().delete_ports(
|
'quantum.agent.ovs_cleanup_util.setup_conf')
|
||||||
all_ports=False)])
|
with setup_conf as mock_setup_conf:
|
||||||
|
conf = mock.Mock()
|
||||||
|
confroot_helper = 'sudo'
|
||||||
|
conf.ovs_all_ports = False
|
||||||
|
conf.ovs_integration_bridge = 'br-int'
|
||||||
|
conf.external_network_bridge = 'br-ex'
|
||||||
|
|
||||||
|
mock_setup_conf.return_value = conf
|
||||||
|
|
||||||
|
util.main()
|
||||||
|
ovs.assert_has_calls([mock.call().delete_ports(
|
||||||
|
all_ports=False)])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user