aboutsummaryrefslogtreecommitdiffstats
path: root/sfc/tests
diff options
context:
space:
mode:
Diffstat (limited to 'sfc/tests')
-rw-r--r--sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py8
-rw-r--r--sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py18
2 files changed, 13 insertions, 13 deletions
diff --git a/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py b/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py
index 76c10126..8ec4dffb 100644
--- a/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py
+++ b/sfc/tests/functest/sfc_one_chain_two_service_functions_different_computes.py
@@ -178,8 +178,8 @@ def main():
'protocol': 6
})
- logger.info(test_utils.run_cmd('tacker sfc-list'))
- logger.info(test_utils.run_cmd('tacker sfc-classifier-list'))
+ logger.info(test_utils.run_cmd('tacker sfc-list')[1])
+ logger.info(test_utils.run_cmd('tacker sfc-classifier-list')[1])
server_ip, client_ip, sf1, sf2 = test_utils.get_floating_ips(
nova_client, neutron_client)
@@ -203,7 +203,7 @@ def main():
time.sleep(100)
logger.info("Test HTTP")
- if not test_utils.is_http_blocked(srv_prv_ip, client_ip):
+ if not test_utils.is_http_blocked(client_ip, srv_prv_ip):
logger.info('\033[92mTEST 1 [PASSED] ==> HTTP WORKS\033[0m')
update_json_results("Test 1: HTTP works", "Passed")
else:
@@ -220,7 +220,7 @@ def main():
test_utils.vxlan_firewall(sf1, port="80")
logger.info("Test HTTP again")
- if test_utils.is_http_blocked(srv_prv_ip, client_ip):
+ if test_utils.is_http_blocked(client_ip, srv_prv_ip):
logger.info('\033[92mTEST 2 [PASSED] ==> HTTP Blocked\033[0m')
update_json_results("Test 2: HTTP Blocked", "Passed")
else:
diff --git a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py
index 58959530..a91b457b 100644
--- a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py
+++ b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py
@@ -128,8 +128,8 @@ def main():
COMMON_CONFIG.vnfd_dir,
TESTCASE_CONFIG.test_vnfd_blue)
os_tacker.create_vnfd(tacker_client, tosca_file=tosca_blue)
- os_tacker.create_vnf(tacker_client, 'testVNF1', vnfd_name='test-vnfd1')
- os_tacker.create_vnf(tacker_client, 'testVNF2', vnfd_name='test-vnfd2')
+ test_utils.create_vnf_in_av_zone(tacker_client, 'testVNF1', 'test-vnfd1')
+ test_utils.create_vnf_in_av_zone(tacker_client, 'testVNF2', 'test-vnfd2')
try:
os_tacker.wait_for_vnf(tacker_client, vnf_name='testVNF1')
@@ -157,8 +157,8 @@ def main():
'protocol': 6
})
- logger.info(test_utils.run_cmd('tacker sfc-list'))
- logger.info(test_utils.run_cmd('tacker sfc-classifier-list'))
+ logger.info(test_utils.run_cmd('tacker sfc-list')[1])
+ logger.info(test_utils.run_cmd('tacker sfc-classifier-list')[1])
# Start measuring the time it takes to implement the classification rules
t1 = threading.Thread(target=test_utils.wait_for_classification_rules,
@@ -190,7 +190,7 @@ def main():
t1.join()
logger.info("Test SSH")
- if test_utils.is_ssh_blocked(srv_prv_ip, client_ip):
+ if test_utils.is_ssh_blocked(client_ip, srv_prv_ip):
results.add_to_summary(2, "PASS", "SSH Blocked")
else:
error = ('\033[91mTEST 1 [FAILED] ==> SSH NOT BLOCKED\033[0m')
@@ -200,7 +200,7 @@ def main():
results.add_to_summary(2, "FAIL", "SSH Blocked")
logger.info("Test HTTP")
- if not test_utils.is_http_blocked(srv_prv_ip, client_ip):
+ if not test_utils.is_http_blocked(client_ip, srv_prv_ip):
results.add_to_summary(2, "PASS", "HTTP works")
else:
error = ('\033[91mTEST 2 [FAILED] ==> HTTP BLOCKED\033[0m')
@@ -229,7 +229,7 @@ def main():
'protocol': 6
})
- logger.info(test_utils.run_cmd('tacker sfc-classifier-list'))
+ logger.info(test_utils.run_cmd('tacker sfc-classifier-list')[1])
# Start measuring the time it takes to implement the classification rules
t2 = threading.Thread(target=test_utils.wait_for_classification_rules,
@@ -243,7 +243,7 @@ def main():
t2.join()
logger.info("Test HTTP")
- if test_utils.is_http_blocked(srv_prv_ip, client_ip):
+ if test_utils.is_http_blocked(client_ip, srv_prv_ip):
results.add_to_summary(2, "PASS", "HTTP Blocked")
else:
error = ('\033[91mTEST 3 [FAILED] ==> HTTP WORKS\033[0m')
@@ -253,7 +253,7 @@ def main():
results.add_to_summary(2, "FAIL", "HTTP Blocked")
logger.info("Test SSH")
- if not test_utils.is_ssh_blocked(srv_prv_ip, client_ip):
+ if not test_utils.is_ssh_blocked(client_ip, srv_prv_ip):
results.add_to_summary(2, "PASS", "SSH works")
else:
error = ('\033[91mTEST 4 [FAILED] ==> SSH BLOCKED\033[0m')