diff options
author | Manuel Buil <mbuil@suse.com> | 2017-04-10 17:23:32 +0200 |
---|---|---|
committer | Brady Johnson <brady.allen.johnson@ericsson.com> | 2017-04-11 08:00:26 +0000 |
commit | fdd96be78394a3ce05d9db5f4f68b60b02e48b1a (patch) | |
tree | 60e682b1960eee7d976e4796c150b3ba4621bd74 | |
parent | a13cf9ed3c16a41e2638c081b4d27a83bbd191d5 (diff) |
Complete sfc_one test
JIRA: SFC-94
We were only blocking one SF to test if the traffic was blocked but we should
test both to be more rigorous
Change-Id: If22a79350c97e0d59ea0a9451303efce21e3f285
Signed-off-by: Manuel Buil <mbuil@suse.com>
-rw-r--r-- | sfc/tests/functest/sfc_one_chain_two_service_functions.py | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sfc/tests/functest/sfc_one_chain_two_service_functions.py b/sfc/tests/functest/sfc_one_chain_two_service_functions.py index bd457bee..801a57b2 100644 --- a/sfc/tests/functest/sfc_one_chain_two_service_functions.py +++ b/sfc/tests/functest/sfc_one_chain_two_service_functions.py @@ -238,12 +238,12 @@ def main(): logger.info("Changing the vxlan_tool to block HTTP traffic") - # Make SF1 block now http traffic + # Make SF1 block http traffic test_utils.stop_vxlan_tool(sf1_floating_ip) logger.info("Starting HTTP firewall on %s" % sf1_floating_ip) test_utils.start_vxlan_tool(sf1_floating_ip, block="80") - logger.info("Test HTTP again") + logger.info("Test HTTP again blocking SF1") if test_utils.is_http_blocked(client_floating_ip, server_ip): results.add_to_summary(2, "PASS", "HTTP Blocked") else: @@ -253,6 +253,23 @@ def main(): ovs_logger, controller_clients, compute_clients, error) results.add_to_summary(2, "FAIL", "HTTP not blocked") + # Make SF2 block http traffic + test_utils.stop_vxlan_tool(sf2_floating_ip) + logger.info("Starting HTTP firewall on %s" % sf2_floating_ip) + test_utils.start_vxlan_tool(sf2_floating_ip, block="80") + logger.info("Stopping HTTP firewall on %s" % sf1_floating_ip) + test_utils.stop_vxlan_tool(sf1_floating_ip) + + logger.info("Test HTTP again blocking SF2") + if test_utils.is_http_blocked(client_floating_ip, server_ip): + results.add_to_summary(2, "PASS", "HTTP Blocked") + else: + error = ('\033[91mTEST 3 [FAILED] ==> HTTP WORKS\033[0m') + logger.error(error) + test_utils.capture_ovs_logs( + ovs_logger, controller_clients, compute_clients, error) + results.add_to_summary(2, "FAIL", "HTTP not blocked") + return results.compile_summary() |