aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack
diff options
context:
space:
mode:
Diffstat (limited to 'functest/opnfv_tests/openstack')
-rwxr-xr-xfunctest/opnfv_tests/openstack/healthcheck/healthcheck.sh16
-rw-r--r--functest/opnfv_tests/openstack/rally/rally.py3
-rw-r--r--functest/opnfv_tests/openstack/tempest/conf_utils.py5
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py8
4 files changed, 20 insertions, 12 deletions
diff --git a/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh b/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh
index 57aa0c70..7fa957c0 100755
--- a/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh
+++ b/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh
@@ -23,17 +23,17 @@ echo "">$LOG_FILE
exec 1<>$LOG_FILE
info () {
- echo -e "$(date '+%Y-%m-%d %H:%M:%S,%3N') - healtcheck - INFO - " "$*" | tee -a $LOG_FILE 1>&2
+ echo -e "$(date '+%Y-%m-%d %H:%M:%S,%3N') - healthcheck - INFO - " "$*" | tee -a $LOG_FILE 1>&2
}
debug () {
if [[ "${CI_DEBUG,,}" == "true" ]]; then
- echo -e "$(date '+%Y-%m-%d %H:%M:%S,%3N') - healtcheck - DEBUG - " "$*" | tee -a $LOG_FILE 1>&2
+ echo -e "$(date '+%Y-%m-%d %H:%M:%S,%3N') - healthcheck - DEBUG - " "$*" | tee -a $LOG_FILE 1>&2
fi
}
error () {
- echo -e "$(date '+%Y-%m-%d %H:%M:%S,%3N') - healtcheck - ERROR - " "$*" | tee -a $LOG_FILE 1>&2
+ echo -e "$(date '+%Y-%m-%d %H:%M:%S,%3N') - healthcheck - ERROR - " "$*" | tee -a $LOG_FILE 1>&2
exit 1
}
@@ -125,16 +125,16 @@ kernel_img=$(cat ${YAML_FILE} | shyaml get-value healthcheck.kernel_image 2> /de
ramdisk_img=$(cat ${YAML_FILE} | shyaml get-value healthcheck.ramdisk_image 2> /dev/null || true)
extra_properties=$(cat ${YAML_FILE} | shyaml get-value healthcheck.extra_properties 2> /dev/null || true)
-# Test if we need to create a 3part image
+# Test if we need to create a 3party image
if [ "X$kernel_img" != "X" ]
then
- img_id=$(glance image-create --name ${kernel_image} --disk-format aki \
+ img_id=$(openstack image create ${kernel_image} --disk-format aki \
--container-format bare < ${kernel_img} | awk '$2 == "id" { print $4 }')
extra_opts="--property kernel_id=${img_id}"
if [ "X$ramdisk_img" != "X" ]
then
- img_id=$(glance image-create --name ${ramdisk_image} --disk-format ari \
+ img_id=$(openstack image create ${ramdisk_image} --disk-format ari \
--container-format bare < ${ramdisk_img} | awk '$2 == "id" { print $4 }')
extra_opts="$extra_opts --property ramdisk_id=${img_id}"
fi
@@ -152,10 +152,10 @@ fi
debug "image extra_properties=${extra_properties}"
-eval glance image-create --name ${image_1} --disk-format ${disk_format} --container-format bare \
+eval openstack image create ${image_1} --disk-format ${disk_format} --container-format bare \
${extra_opts} < ${disk_img}
debug "image '${image_1}' created."
-eval glance image-create --name ${image_2} --disk-format ${disk_format} --container-format bare \
+eval openstack image create ${image_2} --disk-format ${disk_format} --container-format bare \
${extra_opts} < ${disk_img}
debug "image '${image_2}' created."
info "... Glance OK!"
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py
index f984c368..16a872fc 100644
--- a/functest/opnfv_tests/openstack/rally/rally.py
+++ b/functest/opnfv_tests/openstack/rally/rally.py
@@ -66,6 +66,7 @@ class RallyBase(testcase_base.TestcaseBase):
self.cinder_client = os_utils.get_cinder_client()
self.network_dict = {}
self.volume_type = None
+ self.smoke = None
def _build_task_args(self, test_file_name):
task_args = {'service_list': [test_file_name]}
@@ -287,7 +288,7 @@ class RallyBase(testcase_base.TestcaseBase):
cmd_line = ("rally task validate "
"--task {0} "
"--task-args \"{1}\""
- .format(task_file, self.__build_task_args(test_name)))
+ .format(task_file, self._build_task_args(test_name)))
logger.debug('running command line: {}'.format(cmd_line))
p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, shell=True)
diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py
index 4c5e8663..91a5bb4b 100644
--- a/functest/opnfv_tests/openstack/tempest/conf_utils.py
+++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py
@@ -172,6 +172,9 @@ def configure_tempest(deployment_dir, IMAGE_ID=None, FLAVOR_ID=None):
config.write(config_file)
# Copy tempest.conf to /home/opnfv/functest/results/tempest/
+ if not os.path.exists(TEMPEST_RESULTS_DIR):
+ os.makedirs(TEMPEST_RESULTS_DIR)
+
shutil.copyfile(tempest_conf_file,
os.path.join(TEMPEST_RESULTS_DIR, 'tempest.conf'))
@@ -205,7 +208,7 @@ def configure_tempest_multisite(deployment_dir):
# cmd = ("openstack endpoint show kingbird | grep publicurl |"
# "awk '{print $4}' | awk -F '/' '{print $4}'")
# kingbird_api_version = os.popen(cmd).read()
- kingbird_api_version = os_utils.get_endpoint(service_type='kingbird')
+ kingbird_api_version = os_utils.get_endpoint(service_type='multisite')
if CI_INSTALLER_TYPE == 'fuel':
# For MOS based setup, the service is accessible
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index 9c19a147..e1a223a7 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -249,12 +249,16 @@ class TempestCommon(testcase_base.TestcaseBase):
output = logfile.read()
error_logs = ""
- for match in re.findall('(.*?)[. ]*FAILED', output):
+ for match in re.findall('(.*?)[. ]*fail ', output):
error_logs += match
+ skipped_testcase = ""
+ for match in re.findall('(.*?)[. ]*skip:', output):
+ skipped_testcase += match
self.details = {"tests": int(num_tests),
"failures": int(num_failures),
- "errors": error_logs}
+ "errors": error_logs,
+ "skipped": skipped_testcase}
except Exception:
success_rate = 0