Move console output log place in test_cross_tenant_connectivity
Previous place missed to log when we fail to
verify mac address in the VM.
Change-Id: I58b68cbfdee8780fd213ec6b651c5374d5430045
diff --git a/tempest/scenario/test_cross_tenant_connectivity.py b/tempest/scenario/test_cross_tenant_connectivity.py
index a269017..0615e7b 100644
--- a/tempest/scenario/test_cross_tenant_connectivity.py
+++ b/tempest/scenario/test_cross_tenant_connectivity.py
@@ -371,7 +371,6 @@
msg)
except Exception:
debug.log_ip_ns()
- self._log_console_output(servers=self.servers)
raise
def _test_in_tenant_block(self, tenant):
@@ -474,17 +473,21 @@
@attr(type='smoke')
@services('compute', 'network')
def test_cross_tenant_traffic(self):
- for tenant_id in self.tenants.keys():
- self._deploy_tenant(tenant_id)
- self._verify_network_details(self.tenants[tenant_id])
- self._verify_mac_addr(self.tenants[tenant_id])
+ try:
+ for tenant_id in self.tenants.keys():
+ self._deploy_tenant(tenant_id)
+ self._verify_network_details(self.tenants[tenant_id])
+ self._verify_mac_addr(self.tenants[tenant_id])
- # in-tenant check
- self._test_in_tenant_block(self.demo_tenant)
- self._test_in_tenant_allow(self.demo_tenant)
+ # in-tenant check
+ self._test_in_tenant_block(self.demo_tenant)
+ self._test_in_tenant_allow(self.demo_tenant)
- # cross tenant check
- source_tenant = self.demo_tenant
- dest_tenant = self.alt_tenant
- self._test_cross_tenant_block(source_tenant, dest_tenant)
- self._test_cross_tenant_allow(source_tenant, dest_tenant)
+ # cross tenant check
+ source_tenant = self.demo_tenant
+ dest_tenant = self.alt_tenant
+ self._test_cross_tenant_block(source_tenant, dest_tenant)
+ self._test_cross_tenant_allow(source_tenant, dest_tenant)
+ except Exception:
+ self._log_console_output(servers=self.servers)
+ raise