diff options
-rw-r--r-- | docker/Dockerfile | 2 | ||||
-rwxr-xr-x | docker/common.sh | 6 | ||||
-rwxr-xr-x | docker/prepare_env.sh | 15 | ||||
-rw-r--r-- | testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py | 2 | ||||
-rwxr-xr-x | testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py | 2 | ||||
-rw-r--r-- | testcases/VIM/OpenStack/CI/libraries/run_rally.py | 2 | ||||
-rw-r--r-- | testcases/VIM/OpenStack/CI/libraries/run_tempest.py | 2 | ||||
-rwxr-xr-x | testcases/config_functest.py | 2 | ||||
-rw-r--r-- | testcases/functest_utils.py | 2 | ||||
-rw-r--r-- | testcases/tests/TestFunctestUtils.py | 2 | ||||
-rw-r--r-- | testcases/vIMS/CI/vIMS.py | 2 | ||||
-rw-r--r-- | testcases/vPing/CI/libraries/vPing.py | 2 |
12 files changed, 16 insertions, 25 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 6ae06e235..a39775c81 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -10,7 +10,7 @@ # # Execution: # $ docker run -t -i \ -# -e "INSTALLER_TYPE=fuel/foreman" \ +# -e "INSTALLER_TYPE=fuel|apex|compass|joid \ # -e "INSTALLER_IP=10.20.0.2/172.30.10.73" \ # -v $(pwd)/config_functest.yaml:/home/opnfv/functest/conf/config_functest.yaml # opnfv/functest /bin/bash diff --git a/docker/common.sh b/docker/common.sh index aabc32cbe..f21263c7e 100755 --- a/docker/common.sh +++ b/docker/common.sh @@ -20,11 +20,15 @@ # # If it is not provided, take the existing one in the functest repo # +mkdir -p /home/opnfv/functest/conf config_file=/home/opnfv/functest/conf/config_functest.yaml if [ ! -f ${config_file} ]; then - config_file=$(find / -name config_functest.yaml) + default_config_file=$(find /home/opnfv/repos -name config_functest.yaml) + cp $default_config_file $config_file + echo "config_functest.yaml not provided. Using default one" fi + # Parse config_functest.yaml file # TODO: this is not the best way to parse a yaml file in bash... diff --git a/docker/prepare_env.sh b/docker/prepare_env.sh index 1db7be382..cf407499f 100755 --- a/docker/prepare_env.sh +++ b/docker/prepare_env.sh @@ -57,7 +57,7 @@ else fi # definition of available installer names -INSTALLERS=(fuel foreman compass apex joid) +INSTALLERS=(fuel compass apex joid) if [ ! -f ${FUNCTEST_CONF_DIR}/openstack.creds ]; then # If credentials file is not given, check if environment variables are set @@ -179,19 +179,6 @@ if [ ${RALLY_COMMIT} != "latest" ]; then git reset --hard ${RALLY_COMMIT} fi -# Ugly hack: -# After the 'git functest pull', we move the given yaml file to the repo directory, -# since some of the scripts will use that one, and not the one in -# /home/opnfv/functest/conf/ -given_config_file=/home/opnfv/functest/conf/config_functest.yaml -default_config_file=$(find /home/opnfv/repos -name config_functest.yaml) -if [ -f ${given_config_file} ]; then - info "Copying given config_functest.yaml to the repository directory" - cp ${given_config_file} ${default_config_file} -else - info "config_functest.yaml not provided. Using default one: ${default_config_file}" -fi - # Create directories mkdir -p ${FUNCTEST_CONF_DIR} diff --git a/testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py b/testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py index c909d36be..9d0c63451 100644 --- a/testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py +++ b/testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py @@ -40,7 +40,7 @@ class foundation: """ Get Default Parameters value """ - with open(self.workhome + "testcases/config_functest.yaml") as f: + with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py index d44100ef3..082c0cf41 100755 --- a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py @@ -72,7 +72,7 @@ formatter = logging.Formatter("%(asctime)s - %(name)s - " ch.setFormatter(formatter) logger.addHandler(ch) -with open(args.repo_path+"testcases/config_functest.yaml") as f: +with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally.py b/testcases/VIM/OpenStack/CI/libraries/run_rally.py index 52ca59102..ba74a720d 100644 --- a/testcases/VIM/OpenStack/CI/libraries/run_rally.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_rally.py @@ -70,7 +70,7 @@ if not os.path.exists(REPO_PATH): sys.path.append(REPO_PATH + "testcases/") import functest_utils -with open(REPO_PATH+"testcases/config_functest.yaml") as f: +with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() diff --git a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py index f056e5e9e..e24697c76 100644 --- a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py @@ -56,7 +56,7 @@ if not os.path.exists(REPO_PATH): sys.path.append(REPO_PATH + "testcases/") import functest_utils -with open(REPO_PATH+"testcases/config_functest.yaml") as f: +with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() TEST_DB = functest_yaml.get("results").get("test_db_url") diff --git a/testcases/config_functest.py b/testcases/config_functest.py index b4e29bf69..8ae0d1639 100755 --- a/testcases/config_functest.py +++ b/testcases/config_functest.py @@ -43,7 +43,7 @@ if not os.path.exists(REPO_PATH): exit(-1) sys.path.append(REPO_PATH + "testcases/") -with open(REPO_PATH+"testcases/config_functest.yaml") as f: +with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() diff --git a/testcases/functest_utils.py b/testcases/functest_utils.py index fd4e30398..401078b70 100644 --- a/testcases/functest_utils.py +++ b/testcases/functest_utils.py @@ -609,7 +609,7 @@ def get_git_branch(repo_path): def get_installer_type(logger=None): """ - Get installer type (fuel, foreman, apex, joid, compass) + Get installer type (fuel, apex, joid, compass) """ try: installer = os.environ['INSTALLER_TYPE'] diff --git a/testcases/tests/TestFunctestUtils.py b/testcases/tests/TestFunctestUtils.py index 337e4ee8a..46da50cb8 100644 --- a/testcases/tests/TestFunctestUtils.py +++ b/testcases/tests/TestFunctestUtils.py @@ -16,7 +16,7 @@ class TestFunctestUtils(unittest.TestCase): global functest_yaml - with open("../config_functest.yaml") as f: + with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() diff --git a/testcases/vIMS/CI/vIMS.py b/testcases/vIMS/CI/vIMS.py index 465b8e222..d2b6567d8 100644 --- a/testcases/vIMS/CI/vIMS.py +++ b/testcases/vIMS/CI/vIMS.py @@ -63,7 +63,7 @@ if not os.path.exists(REPO_PATH): sys.path.append(REPO_PATH + "testcases/") import functest_utils -with open(REPO_PATH + "testcases/config_functest.yaml") as f: +with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() diff --git a/testcases/vPing/CI/libraries/vPing.py b/testcases/vPing/CI/libraries/vPing.py index d9ceb2f6d..e8e01bf1a 100644 --- a/testcases/vPing/CI/libraries/vPing.py +++ b/testcases/vPing/CI/libraries/vPing.py @@ -63,7 +63,7 @@ if not os.path.exists(REPO_PATH): sys.path.append(REPO_PATH + "testcases/") import functest_utils -with open(REPO_PATH + "testcases/config_functest.yaml") as f: +with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() |