diff options
Diffstat (limited to 'docker')
-rw-r--r-- | docker/Dockerfile | 4 | ||||
-rwxr-xr-x | docker/prepare_env.sh | 1 | ||||
-rwxr-xr-x | docker/run_tests.sh | 35 |
3 files changed, 22 insertions, 18 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 8c53f81d7..99d18cade 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -23,9 +23,9 @@ FROM ubuntu:14.04 MAINTAINER Jose Lausuch <jose.lausuch@ericsson.com> LABEL version="0.1" description="OPNFV Functest Docker container" -ENV repos_dir /home/opnfv/repos ENV HOME /home/opnfv - +ENV repos_dir /home/opnfv/repos +ENV creds /home/opnfv/functest/conf/openstack.creds WORKDIR /home/opnfv # Packaged dependencies diff --git a/docker/prepare_env.sh b/docker/prepare_env.sh index 5a39c8407..0c618bff8 100755 --- a/docker/prepare_env.sh +++ b/docker/prepare_env.sh @@ -92,6 +92,7 @@ if [ $offline == false ]; then info "Functest repo: given commit is ${FUNCTEST_COMMIT}. Reseting..." git reset --hard ${FUNCTEST_COMMIT} fi + source ${BASEDIR}/common.sh info "Updating Releng repository...." cd ${RELENG_REPO_DIR} diff --git a/docker/run_tests.sh b/docker/run_tests.sh index 8b48a8210..c75110b3d 100755 --- a/docker/run_tests.sh +++ b/docker/run_tests.sh @@ -32,6 +32,10 @@ offline=false report="" arr_test=(vping odl tempest vims rally) +function clean_openstack(){ + python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py \ + --debug ${FUNCTEST_REPO_DIR}/ +} function run_test(){ test_name=$1 @@ -46,30 +50,26 @@ function run_test(){ ;; "odl") info "Running ODL test..." + neutron_ip=$(keystone catalog --service identity | grep publicURL | cut -f3 -d"/" | cut -f1 -d":") + odl_ip=$(keystone catalog --service network | grep publicURL | cut -f3 -d"/" | cut -f1 -d":") + usr_name=$(env | grep OS | grep OS_USERNAME | cut -f2 -d'=') + password=$(env | grep OS | grep OS_PASSWORD | cut -f2 -d'=') + odl_port=8181 if [ $INSTALLER_TYPE == "fuel" ]; then - odl_ip=$(keystone catalog --service network | grep publicURL | cut -f3 -d"/" | cut -f1 -d":") - neutron_ip=$(keystone catalog --service identity | grep publicURL | cut -f3 -d"/" | cut -f1 -d":") - usr_name=$(env | grep OS | grep OS_USERNAME | cut -f2 -d'=') - pass=$(env | grep OS | grep OS_PASSWORD | cut -f2 -d'=') - odl_port=8181 - ODL_PORT=$odl_port ODL_IP=$odl_ip NEUTRON_IP=$neutron_ip USR_NAME=$usr_name PASS=$pass \ - ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/start_tests.sh - elif [ $INSTALLER_TYPE == "foreman" ]; then - #odl_port=8081 - ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/start_tests.sh + odl_port=8282 elif [ $INSTALLER_TYPE == "apex" ]; then - # TODO - ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/start_tests.sh + pass elif [ $INSTALLER_TYPE == "joid" ]; then - # TODO - ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/start_tests.sh + pass elif [ $INSTALLER_TYPE == "compass" ]; then - # TODO - ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/start_tests.sh + pass else error "INSTALLER_TYPE not valid." exit 1 fi + ODL_PORT=$odl_port ODL_IP=$odl_ip NEUTRON_IP=$neutron_ip USR_NAME=$usr_name PASS=$password \ + ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/start_tests.sh + # save ODL results odl_logs="${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/logs" if [ -d ${odl_logs} ]; then @@ -85,16 +85,19 @@ function run_test(){ if [ -f ${tempest_conf} ]; then cp $tempest_conf ${FUNCTEST_CONF_DIR} fi + clean_openstack ;; "vims") info "Running vIMS test..." python ${FUNCTEST_REPO_DIR}/testcases/vIMS/CI/vIMS.py \ --debug ${FUNCTEST_REPO_DIR}/ ${report} + clean_openstack ;; "rally") info "Running Rally benchmark suite..." python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/run_rally.py \ --debug ${FUNCTEST_REPO_DIR}/ all ${report} + clean_openstack ;; "bgpvpn_template") info "Running BGPVPN Tempest test case..." |