From c5d182da588d8dcf107d22735eb37250362043c0 Mon Sep 17 00:00:00 2001 From: rossella Date: Thu, 23 Jul 2015 19:41:20 +0200 Subject: [PATCH] OVS agent add functional tests of OVS status Add a functional tests to verify that the agent behaves correctly when OVS restarted. Partially-Implements: blueprint restructure-l2-agent Change-Id: Ifeb0f2f6a06baead93df2c016ea26bfea990734d --- neutron/tests/functional/agent/test_l2_ovs_agent.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/neutron/tests/functional/agent/test_l2_ovs_agent.py b/neutron/tests/functional/agent/test_l2_ovs_agent.py index 3987c9f5489..f8ad8a4647a 100644 --- a/neutron/tests/functional/agent/test_l2_ovs_agent.py +++ b/neutron/tests/functional/agent/test_l2_ovs_agent.py @@ -68,6 +68,15 @@ class TestOVSAgent(base.OVSAgentTestFramework): trigger_resync=True) self.wait_until_ports_state(self.ports, up=True) + def test_reprocess_port_when_ovs_restarts(self): + self.setup_agent_and_ports( + port_dicts=self.create_test_ports()) + self.wait_until_ports_state(self.ports, up=True) + self.agent.check_ovs_status.return_value = constants.OVS_RESTARTED + # OVS restarted, the agent should reprocess all the ports + self.agent.plugin_rpc.update_device_list.reset_mock() + self.wait_until_ports_state(self.ports, up=True) + def test_port_vlan_tags(self): self.setup_agent_and_ports( port_dicts=self.create_test_ports(),