summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ci/prepare_env.py2
-rw-r--r--testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py3
-rw-r--r--testcases/VIM/OpenStack/CI/libraries/run_tempest.py2
3 files changed, 4 insertions, 3 deletions
diff --git a/ci/prepare_env.py b/ci/prepare_env.py
index 520db44ec..bd6c98647 100644
--- a/ci/prepare_env.py
+++ b/ci/prepare_env.py
@@ -47,7 +47,7 @@ CI_DEBUG = False
REPOS_DIR = os.getenv('repos_dir')
FUNCTEST_REPO = REPOS_DIR + '/functest/'
-with open("/home/opnfv/repos/functest/testcases/config_functest.yaml") as f:
+with open(os.environ["CONFIG_FUNCTEST_YAML"]) as f:
functest_yaml = yaml.safe_load(f)
FUNCTEST_CONF_DIR = functest_yaml.get("general").get(
diff --git a/testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py b/testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py
index d4a145566..47605eb74 100644
--- a/testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py
+++ b/testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py
@@ -54,9 +54,8 @@ class foundation:
"""
Get Default Parameters value
"""
- with open(self.workhome + "/testcases/config_functest.yaml") as f:
+ with open(os.environ["CONFIG_FUNCTEST_YAML"]) as f:
functest_yaml = yaml.safe_load(f)
- f.close()
self.Result_DB = str(functest_yaml.get("results").get("test_db_url"))
self.masterusername = str(functest_yaml.get("ONOS").get("general").
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py
index 4b1f0ffae..02d9b331a 100644
--- a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py
+++ b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py
@@ -20,6 +20,7 @@ import re
import requests
import shutil
import subprocess
+import sys
import time
import yaml
import ConfigParser
@@ -212,6 +213,7 @@ def configure_tempest(mode):
private_net = os_utils.get_private_net(neutron_client)
if private_net is None:
logger.error("No shared private networks found.")
+ sys.exit(1)
else:
private_net_name = private_net['name']
config.set('compute', 'fixed_network_name', private_net_name)