From 8b20ba3cfb84c525ce2416189219ab891aed8ac0 Mon Sep 17 00:00:00 2001 From: Ruslan Khozinov Date: Wed, 21 Sep 2016 17:31:18 +0300 Subject: [PATCH] Fix for missing show_step Missed show_step is the root cause of step reordering in logs. Without showing of the step in a test log we get errors like this: "ERROR base_test_case.py:124 -- The step 11 should be 10 at dvs_vcenter_security" Change-Id: I4ed6bbeca17e39f93d81bc6e0fd50c69f10eaa7d --- docs/test_plan/source/test_suite_system.rst | 8 +++---- .../tests/test_plugin_vmware_dvs_smoke.py | 1 + .../tests/test_plugin_vmware_dvs_system.py | 22 +++++++++++++------ 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/docs/test_plan/source/test_suite_system.rst b/docs/test_plan/source/test_suite_system.rst index 6b86c39..7b76ed9 100644 --- a/docs/test_plan/source/test_suite_system.rst +++ b/docs/test_plan/source/test_suite_system.rst @@ -717,14 +717,14 @@ Steps * Networking: Neutron with VLAN segmentation * Storage: default * Additional services: default - 3. Add nodes with following roles: + 3. Enable and configure DVS plugin. + 4. Add nodes with following roles: * Controller * Compute * Cinder * CinderVMware - 4. Configure interfaces on nodes. - 5. Configure network settings. - 6. Enable and configure DVS plugin. + 5. Configure interfaces on nodes. + 6. Configure network settings. 7. Configure VMware vCenter Settings. Add 1 vSphere clusters and configure Nova Compute instances on controllers. 8. Verify networks. 9. Deploy cluster. diff --git a/plugin_test/tests/test_plugin_vmware_dvs_smoke.py b/plugin_test/tests/test_plugin_vmware_dvs_smoke.py index f1393ff..05b0fcc 100644 --- a/plugin_test/tests/test_plugin_vmware_dvs_smoke.py +++ b/plugin_test/tests/test_plugin_vmware_dvs_smoke.py @@ -56,6 +56,7 @@ class TestDVSSmoke(TestBasic): self.show_step(2) plugin.install_dvs_plugin(self.ssh_manager.admin_ip) + self.show_step(3) cmd = 'fuel plugins list' output = self.ssh_manager.execute_on_remote( diff --git a/plugin_test/tests/test_plugin_vmware_dvs_system.py b/plugin_test/tests/test_plugin_vmware_dvs_system.py index 8dec17b..f2a6b9f 100644 --- a/plugin_test/tests/test_plugin_vmware_dvs_system.py +++ b/plugin_test/tests/test_plugin_vmware_dvs_system.py @@ -283,6 +283,7 @@ class TestDVSSystem(TestBasic): security_groups=[security_group.name]) openstack.verify_instance_state(os_conn) + self.show_step(7) # Get floating ip of instances fip = openstack.create_and_assign_floating_ips(os_conn, instances) ip_pair = dict.fromkeys(fip) @@ -471,6 +472,7 @@ class TestDVSSystem(TestBasic): for key in ip_pair: ip_pair[key] = [value for value in fip if key != value] openstack.check_connection_vms(ip_pair) + self.show_step(10) openstack.check_connection_vms(ip_pair, command='ssh') self.show_step(11) @@ -516,6 +518,10 @@ class TestDVSSystem(TestBasic): openstack.check_connection_vms( ip_pair, timeout=wait_to_update_rules_on_dvs_ports) + self.show_step(18) + self.show_step(19) + self.show_step(20) + self.show_step(21) srv_list = os_conn.get_servers() for srv in srv_list: @@ -780,15 +786,15 @@ class TestDVSSystem(TestBasic): * Networking: Neutron with VLAN segmentation * Storage: default * Additional services: default - 4. Add nodes with following roles: + 4. Enable and configure DVS plugin. + 5. Add nodes with following roles: * Controller * Compute * Cinder * CinderVMware * Compute-VMware - 5. Configure interfaces on nodes. - 6. Configure network settings. - 7. Enable and configure DVS plugin. + 6. Configure interfaces on nodes. + 7. Configure network settings. 8. Configure VMware vCenter Settings. Add 2 vSphere clusters and configure Nova Compute instances on conroller and compute-vmware. @@ -816,11 +822,12 @@ class TestDVSSystem(TestBasic): "net_segment_type": NEUTRON_SEGMENT_TYPE } ) + self.show_step(4) plugin.enable_plugin(cluster_id, self.fuel_web) - self.show_step(4) self.show_step(5) self.show_step(6) + self.show_step(7) self.fuel_web.update_nodes(cluster_id, {'slave-01': ['controller'], 'slave-02': ['compute'], @@ -829,6 +836,7 @@ class TestDVSSystem(TestBasic): 'slave-05': ['compute-vmware']}) self.show_step(8) + self.show_step(9) logger.info('Configure VMware vCenter Settings.') target_node_2 = self.node_name('slave-05') self.fuel_web.vcenter_configure(cluster_id, @@ -1545,17 +1553,17 @@ class TestDVSSystem(TestBasic): os_conn.add_router_interface(router_id=router_1["id"], subnet_id=subnet["id"]) + self.show_step(3) + self.show_step(4) self.show_step(5) sg1 = os_conn.nova.security_groups.create('SG1', "descr") sg2 = os_conn.nova.security_groups.create('SG2', "descr") - self.show_step(3) access_point_1, access_point_ip_1 = openstack.create_access_point( os_conn=os_conn, nics=[{'net-id': net_1['id']}], security_groups=[security_group.name, sg1.name]) - self.show_step(4) access_point_2, access_point_ip_2 = openstack.create_access_point( os_conn=os_conn, nics=[{'net-id': net_1['id']}],