diff options
author | Manuel Buil <mbuil@suse.com> | 2017-09-15 11:54:12 +0200 |
---|---|---|
committer | Brady Johnson <bjohnson@inocybe.com> | 2017-09-15 15:05:13 +0000 |
commit | 85aa735678433c40f8369781fba29af4dbbbd416 (patch) | |
tree | 2fb7442c653e9912c9a465157d160a21a5526424 | |
parent | fd243c2e0f2f4caa405473f95e8de5d44d862e8c (diff) |
Sync both test cases and move checks to the start
There are some checks in sfc_two... which do not exist in sfc_one. Those checks
should be done at the beginning of the test
Change-Id: I44c612c7dfe6bb4329bc49478f3342cda555229c
Signed-off-by: Manuel Buil <mbuil@suse.com>
-rw-r--r-- | sfc/tests/functest/sfc_one_chain_two_service_functions.py | 17 | ||||
-rw-r--r-- | sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py | 31 |
2 files changed, 34 insertions, 14 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 13ac418d..0f4d6aa9 100644 --- a/sfc/tests/functest/sfc_one_chain_two_service_functions.py +++ b/sfc/tests/functest/sfc_one_chain_two_service_functions.py @@ -41,6 +41,23 @@ def main(): COMMON_CONFIG.installer_password, COMMON_CONFIG.installer_key_file) + installer_type = os.environ.get("INSTALLER_TYPE") + + supported_installers = ['fuel', 'apex', 'OSA'] + + if installer_type not in supported_installers: + logger.error( + '\033[91mYour installer is not supported yet\033[0m') + sys.exit(1) + + installer_ip = os.environ.get("INSTALLER_IP") + if not installer_ip: + logger.error( + '\033[91minstaller ip is not set\033[0m') + logger.error( + '\033[91mexport INSTALLER_IP=<ip>\033[0m') + sys.exit(1) + cluster = COMMON_CONFIG.installer_cluster openstack_nodes = (deploymentHandler.get_nodes({'cluster': cluster}) 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 ff343761..22249c25 100644 --- a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py +++ b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py @@ -40,6 +40,23 @@ def main(): COMMON_CONFIG.installer_password, COMMON_CONFIG.installer_key_file) + installer_type = os.environ.get("INSTALLER_TYPE") + + supported_installers = ['fuel', 'apex', 'OSA'] + + if installer_type not in supported_installers: + logger.error( + '\033[91mYour installer is not supported yet\033[0m') + sys.exit(1) + + installer_ip = os.environ.get("INSTALLER_IP") + if not installer_ip: + logger.error( + '\033[91minstaller ip is not set\033[0m') + logger.error( + '\033[91mexport INSTALLER_IP=<ip>\033[0m') + sys.exit(1) + cluster = COMMON_CONFIG.installer_cluster openstack_nodes = (deploymentHandler.get_nodes({'cluster': cluster}) if cluster is not None @@ -60,20 +77,6 @@ def main(): results.add_to_summary(2, "STATUS", "SUBTEST") results.add_to_summary(0, "=") - installer_type = os.environ.get("INSTALLER_TYPE") - if installer_type != "fuel" and installer_type != "apex": - logger.error( - '\033[91mCurrently supported only Fuel and Apex\033[0m') - sys.exit(1) - - installer_ip = os.environ.get("INSTALLER_IP") - if not installer_ip: - logger.error( - '\033[91minstaller ip is not set\033[0m') - logger.error( - '\033[91mexport INSTALLER_IP=<ip>\033[0m') - sys.exit(1) - test_utils.download_image(COMMON_CONFIG.url, COMMON_CONFIG.image_path) _, custom_flv_id = os_utils.get_or_create_flavor( |