]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
OVS agent add functional tests of OVS status
authorrossella <rsblendido@suse.com>
Thu, 23 Jul 2015 17:41:20 +0000 (19:41 +0200)
committerrossella <rsblendido@suse.com>
Tue, 1 Sep 2015 17:29:18 +0000 (17:29 +0000)
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

index 3987c9f54892b78184fffd0f3410739700f4b7bc..f8ad8a4647a08f580ecf324cc15ee89d7db9f919 100644 (file)
@@ -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(),