aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaime Caamaño Ruiz <jcaamano@suse.com>2018-05-22 16:11:57 +0200
committerJaime Caamaño Ruiz <jcaamano@suse.com>2018-05-22 16:19:15 +0200
commitdf29f2f2424c567582dfa5f6709aad8d58790182 (patch)
tree0bc2e021954f3fb70b7700caa6166add34d4f849
parentf150d5d09938953aeb8b496168b12d41758e7aa0 (diff)
Fix symmetric test case result summary
Correctly print in test summary whether we are testing HTTP uplink or HTTP uplink. Change-Id: Ib8d4cc4a5e794384720d7023032c5340039e2ff1 Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
-rw-r--r--sfc/tests/functest/sfc_parent_function.py10
-rw-r--r--sfc/tests/functest/sfc_symmetric_chain.py6
2 files changed, 10 insertions, 6 deletions
diff --git a/sfc/tests/functest/sfc_parent_function.py b/sfc/tests/functest/sfc_parent_function.py
index 24ddd2e8..6161ae67 100644
--- a/sfc/tests/functest/sfc_parent_function.py
+++ b/sfc/tests/functest/sfc_parent_function.py
@@ -408,11 +408,13 @@ class SfcCommonTestCase(object):
return results
- def present_results_blocked_port_http(self, testcase_config):
+ def present_results_blocked_port_http(self, testcase_config,
+ test='HTTP'):
"""Check whether the connection between server and client using
HTTP protocol and for a specific port is blocked or not.
:param testcase_config: The config input of the test case
+ :param test: custom test string to print on result summary
:return: The results for the specific action of the scenario
"""
@@ -420,14 +422,14 @@ class SfcCommonTestCase(object):
logger.info("Test if HTTP from port %s doesn't work" % allowed_port)
if test_utils.is_http_blocked(
self.client_floating_ip, self.server_ip, allowed_port):
- results.add_to_summary(2, "PASS", "HTTP uplink blocked")
+ results.add_to_summary(2, "PASS", test + " blocked")
else:
- error = ('\033[91mTEST [FAILED] ==> HTTP BLOCKED\033[0m')
+ error = ('\033[91mTEST [FAILED] ==> HTTP WORKS\033[0m')
logger.error(error)
test_utils.capture_ovs_logs(
self.ovs_logger, self.controller_clients, self.compute_clients,
error)
- results.add_to_summary(2, "FAIL", "HTTP works")
+ results.add_to_summary(2, "FAIL", test + " works")
return results
diff --git a/sfc/tests/functest/sfc_symmetric_chain.py b/sfc/tests/functest/sfc_symmetric_chain.py
index 309d0dbc..7c453b59 100644
--- a/sfc/tests/functest/sfc_symmetric_chain.py
+++ b/sfc/tests/functest/sfc_symmetric_chain.py
@@ -116,14 +116,16 @@ class SfcSymmetricChain(sfc_parent_function.SfcCommonTestCase):
self.vxlan_start_interface(self.fips_sfs[0], 'eth0', 'eth1', "80")
self.vxlan_start_interface(self.fips_sfs[0], 'eth1', 'eth0', None)
- results = self.present_results_blocked_port_http(self.testcase_config)
+ results = self.present_results_blocked_port_http(self.testcase_config,
+ 'HTTP uplink')
self.vxlan_blocking_stop(self.fips_sfs[0])
self.vxlan_start_interface(self.fips_sfs[0], 'eth0', 'eth1', None)
self.vxlan_start_interface(self.fips_sfs[0], 'eth1', 'eth0',
self.testcase_config.source_port)
- results = self.present_results_blocked_port_http(self.testcase_config)
+ results = self.present_results_blocked_port_http(self.testcase_config,
+ 'HTTP downlink')
self.vxlan_blocking_stop(self.fips_sfs[0])
self.vxlan_start_interface(self.fips_sfs[0], 'eth0', 'eth1', None)