aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests
diff options
context:
space:
mode:
Diffstat (limited to 'functest/opnfv_tests')
-rwxr-xr-xfunctest/opnfv_tests/openstack/healthcheck/healthcheck.sh16
-rwxr-xr-xfunctest/opnfv_tests/sdn/odl/odl.py17
-rwxr-xr-x[-rw-r--r--]functest/opnfv_tests/vnf/aaa/aaa.py0
3 files changed, 19 insertions, 14 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/sdn/odl/odl.py b/functest/opnfv_tests/sdn/odl/odl.py
index 339c305e..9502be93 100755
--- a/functest/opnfv_tests/sdn/odl/odl.py
+++ b/functest/opnfv_tests/sdn/odl/odl.py
@@ -54,6 +54,7 @@ class ODLTests(testcase_base.TestcaseBase):
"csit/suites/openstack/neutron")
basic_suite_dir = os.path.join(odl_test_repo,
"csit/suites/integration/basic")
+ default_suites = [basic_suite_dir, neutron_suite_dir]
res_dir = '/home/opnfv/functest/results/odl/'
logger = ft_logger.Logger("opendaylight").getLogger()
@@ -89,8 +90,7 @@ class ODLTests(testcase_base.TestcaseBase):
self.details['description'] = result.suite.name
self.details['tests'] = visitor.get_data()
- def main(self, **kwargs):
- dirs = [self.basic_suite_dir, self.neutron_suite_dir]
+ def main(self, suites=default_suites, **kwargs):
try:
odlusername = kwargs['odlusername']
odlpassword = kwargs['odlpassword']
@@ -117,7 +117,7 @@ class ODLTests(testcase_base.TestcaseBase):
stdout_file = os.path.join(self.res_dir, 'stdout.txt')
output_dir = os.path.join(self.res_dir, 'output.xml')
with open(stdout_file, 'w+') as stdout:
- robot.run(*dirs, variable=variables,
+ robot.run(*suites, variable=variables,
output=output_dir,
log='NONE',
report='NONE',
@@ -140,8 +140,13 @@ class ODLTests(testcase_base.TestcaseBase):
else:
return self.EX_RUN_ERROR
- def run(self):
+ def run(self, **kwargs):
try:
+ suites = self.default_suites
+ try:
+ suites = kwargs["suites"]
+ except KeyError:
+ pass
keystone_url = op_utils.get_endpoint(service_type='identity')
neutron_url = op_utils.get_endpoint(service_type='network')
kwargs = {'keystoneip': urlparse.urlparse(keystone_url).hostname}
@@ -178,7 +183,7 @@ class ODLTests(testcase_base.TestcaseBase):
self.logger.exception("Cannot run ODL testcases.")
return self.EX_RUN_ERROR
- return self.main(**kwargs)
+ return self.main(suites, **kwargs)
class ODLParser():
@@ -228,7 +233,7 @@ if __name__ == '__main__':
parser = ODLParser()
args = parser.parse_args(sys.argv[1:])
try:
- result = odl.main(**args)
+ result = odl.main(ODLTests.default_suites, **args)
if result != testcase_base.TestcaseBase.EX_OK:
sys.exit(result)
if args['pushtodb']:
diff --git a/functest/opnfv_tests/vnf/aaa/aaa.py b/functest/opnfv_tests/vnf/aaa/aaa.py
index f1c265f4..f1c265f4 100644..100755
--- a/functest/opnfv_tests/vnf/aaa/aaa.py
+++ b/functest/opnfv_tests/vnf/aaa/aaa.py