aboutsummaryrefslogtreecommitdiffstats
path: root/functest/ci
diff options
context:
space:
mode:
Diffstat (limited to 'functest/ci')
-rwxr-xr-xfunctest/ci/check_os.sh24
-rw-r--r--functest/ci/config_functest.yaml8
-rwxr-xr-xfunctest/ci/prepare_env.py6
-rwxr-xr-xfunctest/ci/run_tests.py22
-rw-r--r--functest/ci/testcases.yaml1
5 files changed, 33 insertions, 28 deletions
diff --git a/functest/ci/check_os.sh b/functest/ci/check_os.sh
index ce0bc20c6..7b66f3da6 100755
--- a/functest/ci/check_os.sh
+++ b/functest/ci/check_os.sh
@@ -6,12 +6,18 @@
# jose.lausuch@ericsson.com
#
+if [[ ${OS_INSECURE,,} == "true" ]]; then
+ options='--insecure'
+else
+ options=''
+fi
+
declare -A service_cmd_array
-service_cmd_array['nova']='openstack server list'
-service_cmd_array['neutron']='openstack network list'
-service_cmd_array['keystone']='openstack endpoint list'
-service_cmd_array['cinder']='openstack volume list'
-service_cmd_array['glance']='openstack image list'
+service_cmd_array['nova']="openstack $options server list"
+service_cmd_array['neutron']="openstack $options network list"
+service_cmd_array['keystone']="openstack $options endpoint list"
+service_cmd_array['cinder']="openstack $options volume list"
+service_cmd_array['glance']="openstack $options image list"
MANDATORY_SERVICES='nova neutron keystone glance'
OPTIONAL_SERVICES='cinder'
@@ -41,7 +47,7 @@ check_service() {
required=$2
fi
echo ">>Checking ${service} service..."
- if ! openstack service list | grep -i ${service} > /dev/null; then
+ if ! openstack $options service list | grep -i ${service} > /dev/null; then
if [ "$required" == 'false' ]; then
echo "WARN: Optional Service ${service} is not enabled!"
return
@@ -67,7 +73,7 @@ fi
echo "Checking OpenStack endpoints:"
-publicURL=$(openstack catalog show identity |awk '/public/ {print $4}')
+publicURL=$(openstack $options catalog show identity |awk '/public/ {print $4}')
publicIP=$(echo $publicURL|sed 's/^.*http.*\:\/\///'|sed 's/.[^:]*$//')
publicPort=$(echo $publicURL|grep -Po '(?<=:)\d+')
https_enabled=$(echo $publicURL | grep 'https')
@@ -99,11 +105,11 @@ for service in $OPTIONAL_SERVICES; do
done
echo "Checking External network..."
-networks=($(neutron net-list -F id | tail -n +4 | head -n -1 | awk '{print $2}'))
+networks=($(neutron $options net-list -F id | tail -n +4 | head -n -1 | awk '{print $2}'))
is_external=False
for net in "${networks[@]}"
do
- is_external=$(neutron net-show $net|grep "router:external"|awk '{print $4}')
+ is_external=$(neutron $options net-show $net|grep "router:external"|awk '{print $4}')
if [ $is_external == "True" ]; then
echo "External network found: $net"
break
diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml
index ed3f24752..1199be5ad 100644
--- a/functest/ci/config_functest.yaml
+++ b/functest/ci/config_functest.yaml
@@ -3,7 +3,7 @@ general:
home: /home/opnfv
repos: /home/opnfv/repos
dir_repo_rally: /home/opnfv/repos/rally
- repo_tempest: /home/opnfv/repos/tempest
+ repo_tempest: /home/opnfv/.tempest
dir_repo_releng: /home/opnfv/repos/releng
repo_vims_test: /home/opnfv/repos/vnfs/vims-test
repo_onos: /home/opnfv/repos/onos
@@ -57,9 +57,9 @@ general:
snaps:
use_keystone: True
use_floating_ips: True
-# images:
-# cirros:
-# disk_url: http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
+ images:
+ cirros:
+ disk_file: /home/opnfv/functest/images/cirros-0.3.5-x86_64-disk.img
# ARM
# disk_url: http://download.cirros-cloud.net/daily/20161201/cirros-d161201-aarch64-disk.img
# kernel_url: http://download.cirros-cloud.net/daily/20161201/cirros-d161201-aarch64-kernel
diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py
index fd1f5dbfa..64fcc9256 100755
--- a/functest/ci/prepare_env.py
+++ b/functest/ci/prepare_env.py
@@ -251,8 +251,8 @@ def update_db_url():
def verify_deployment():
print_separator()
logger.info("Verifying OpenStack services...")
- cmd = ("sh %s" % pkg_resources.resource_filename(
- 'functest', 'ci/check_os.sh'))
+ cmd = ("%s" % pkg_resources.resource_filename(
+ 'functest', 'ci/check_os.sh'))
logger.debug("Executing command: %s" % cmd)
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
@@ -366,7 +366,6 @@ def main(**kwargs):
elif kwargs['action'] == "start":
logger.info("######### Preparing Functest environment #########\n")
check_env_variables()
- get_deployment_handler()
create_directories()
source_rc_file()
update_config_file()
@@ -377,7 +376,6 @@ def main(**kwargs):
with open(CONST.__getattribute__('env_active'), "w") as env_file:
env_file.write("1")
check_environment()
- print_deployment_info()
elif kwargs['action'] == "check":
check_environment()
except Exception as e:
diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py
index 430f0ca8d..722df14fe 100755
--- a/functest/ci/run_tests.py
+++ b/functest/ci/run_tests.py
@@ -252,16 +252,18 @@ class Runner(object):
msg.add_row([env_var, CONST.__getattribute__(env_var)])
logger.info("Deployment description: \n\n%s\n", msg)
- msg = prettytable.PrettyTable(
- header_style='upper', padding_width=5,
- field_names=['test case', 'project', 'tier', 'duration', 'result'])
- for test_case in self.executed_test_cases:
- result = 'PASS' if(test_case.is_successful(
- ) == test_case.EX_OK) else 'FAIL'
- msg.add_row([test_case.case_name, test_case.project_name,
- _tiers.get_tier_name(test_case.case_name),
- test_case.get_duration(), result])
- logger.info("FUNCTEST REPORT: \n\n%s\n", msg)
+ if len(self.executed_test_cases) > 1:
+ msg = prettytable.PrettyTable(
+ header_style='upper', padding_width=5,
+ field_names=['test case', 'project', 'tier',
+ 'duration', 'result'])
+ for test_case in self.executed_test_cases:
+ result = 'PASS' if(test_case.is_successful(
+ ) == test_case.EX_OK) else 'FAIL'
+ msg.add_row([test_case.case_name, test_case.project_name,
+ _tiers.get_tier_name(test_case.case_name),
+ test_case.get_duration(), result])
+ logger.info("FUNCTEST REPORT: \n\n%s\n", msg)
logger.info("Execution exit value: %s" % self.overall_result)
return self.overall_result
diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml
index c30292bc7..2763d0c23 100644
--- a/functest/ci/testcases.yaml
+++ b/functest/ci/testcases.yaml
@@ -269,7 +269,6 @@ tiers:
-
case_name: doctor-notification
- enabled: false
project_name: doctor
criteria: 100
blocking: false