summaryrefslogtreecommitdiffstats
path: root/jjb/functest
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/functest')
-rwxr-xr-xjjb/functest/functest-alpine.sh45
-rw-r--r--jjb/functest/functest-daily-jobs.yml2
-rwxr-xr-xjjb/functest/functest-k8.sh15
3 files changed, 34 insertions, 28 deletions
diff --git a/jjb/functest/functest-alpine.sh b/jjb/functest/functest-alpine.sh
index 432bbbb8b..dfadf9a37 100755
--- a/jjb/functest/functest-alpine.sh
+++ b/jjb/functest/functest-alpine.sh
@@ -161,28 +161,35 @@ if [ "${INSTALLER_TYPE}" == 'fuel' ]; then
envs="${envs} -e POD_ARCH=${COMPUTE_ARCH}"
fi
-volumes="${images_vol} ${results_vol} ${sshkey_vol} ${rc_file_vol} ${cacert_file_vol}"
-set +e
+if [[ ${INSTALLER_TYPE} == 'compass' && ${DEPLOY_SCENARIO} =~ 'sfc' ]]; then
+ ssh_key="/tmp/id_rsa"
+ user_config="/tmp/openstack_user_config.yml"
+ docker cp compass-tasks:/root/.ssh/id_rsa $ssh_key
+ docker cp compass-tasks:/etc/openstack_deploy/openstack_user_config.yml $user_config
+ sshkey_vol="-v ${ssh_key}:/root/.ssh/id_rsa"
+ userconfig_vol="-v ${user_config}:${user_config}"
+ envs="${envs} -e EXTERNAL_NETWORK=${EXTERNAL_NETWORK}"
+fi
+
+
+volumes="${images_vol} ${results_vol} ${sshkey_vol} ${userconfig_vol} ${rc_file_vol} ${cacert_file_vol}"
+set +e
-if [[ ${DEPLOY_SCENARIO} =~ ^os-.* ]]; then
- [[ ${BRANCH##*/} == "master" ]] && check_os_deployment
- if [ ${FUNCTEST_MODE} == 'testcase' ]; then
- echo "FUNCTEST_MODE=testcase, FUNCTEST_SUITE_NAME=${FUNCTEST_SUITE_NAME}"
- run_test ${FUNCTEST_SUITE_NAME}
- elif [ ${FUNCTEST_MODE} == 'tier' ]; then
- echo "FUNCTEST_MODE=tier, FUNCTEST_TIER=${FUNCTEST_TIER}"
- tiers=(${FUNCTEST_TIER})
- run_tiers ${tiers}
+[[ ${BRANCH##*/} == "master" ]] && check_os_deployment
+if [ ${FUNCTEST_MODE} == 'testcase' ]; then
+ echo "FUNCTEST_MODE=testcase, FUNCTEST_SUITE_NAME=${FUNCTEST_SUITE_NAME}"
+ run_test ${FUNCTEST_SUITE_NAME}
+elif [ ${FUNCTEST_MODE} == 'tier' ]; then
+ echo "FUNCTEST_MODE=tier, FUNCTEST_TIER=${FUNCTEST_TIER}"
+ tiers=(${FUNCTEST_TIER})
+ run_tiers ${tiers}
+else
+ if [ ${DEPLOY_TYPE} == 'baremetal' ]; then
+ tiers=(healthcheck smoke features vnf parser)
else
- if [ ${DEPLOY_TYPE} == 'baremetal' ]; then
- tiers=(healthcheck smoke features vnf parser)
- else
- tiers=(healthcheck smoke features)
- fi
- run_tiers ${tiers}
+ tiers=(healthcheck smoke features)
fi
-else
- echo "k8 deployment has not been supported by functest yet"
+ run_tiers ${tiers}
fi
diff --git a/jjb/functest/functest-daily-jobs.yml b/jjb/functest/functest-daily-jobs.yml
index a58e0bf3f..8ffbe9e63 100644
--- a/jjb/functest/functest-daily-jobs.yml
+++ b/jjb/functest/functest-daily-jobs.yml
@@ -199,7 +199,7 @@
- 'daily':
job-timeout: 360
- 'arm-daily':
- job-timeout: 360
+ job-timeout: 480
jobs:
- 'functest-{installer}-{pod}-{testsuite}-{stream}'
diff --git a/jjb/functest/functest-k8.sh b/jjb/functest/functest-k8.sh
index 3f08e4a0b..9017354cc 100755
--- a/jjb/functest/functest-k8.sh
+++ b/jjb/functest/functest-k8.sh
@@ -12,14 +12,13 @@ sudo rm -rf $rc_file
if [[ ${INSTALLER_TYPE} == 'compass' ]]; then
admin_conf_file_vol="-v ${HOME}/admin.conf:/root/.kube/config"
- echo "export KUBECONFIG=/root/.kube/config" >> $rc_file
echo "export KUBERNETES_PROVIDER=local" >> $rc_file
KUBE_MASTER_URL=$(cat ${HOME}/admin.conf|grep server| awk '{print $2}')
echo "export KUBE_MASTER_URL=$KUBE_MASTER_URL" >> $rc_file
KUBE_MASTER_IP=$(echo $KUBE_MASTER_URL|awk -F'https://|:[0-9]+' '$0=$2')
echo "export KUBE_MASTER_IP=$KUBE_MASTER_IP" >> $rc_file
elif [[ ${INSTALLER_TYPE} == 'joid' && ${BRANCH} == 'master' ]]; then
- admin_conf_file_vol="-v ${HOME}/joid_config/config:/root/joid_config/config"
+ admin_conf_file_vol="-v ${HOME}/joid_config/config:/root/.kube/config"
rc_file=${HOME}/joid_config/k8config
else
echo "Not supported by other installers yet"
@@ -35,25 +34,25 @@ results_vol="-v ${dir_result}:${FUNCTEST_DIR}/results"
volumes="${rc_file_vol} ${results_vol} ${admin_conf_file_vol}"
-# Set iptables rule to allow forwarding return traffic for container
-if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FORWARD | awk 'NR==3' | grep RETURN 2> ${redirect}; then
- sudo iptables -I FORWARD -j RETURN
-fi
-
envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} \
-e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \
-e BUILD_TAG=${BUILD_TAG} -e DEPLOY_TYPE=${DEPLOY_TYPE}"
DOCKER_TAG=`[[ ${BRANCH##*/} == "master" ]] && echo "latest" || echo ${BRANCH##*/}`
+set +e
+
FUNCTEST_IMAGE=opnfv/functest-kubernetes:${DOCKER_TAG}
echo "Pulling Docker image ${FUNCTEST_IMAGE} ..."
docker pull ${FUNCTEST_IMAGE}>/dev/null
cmd_opt="run_tests -r -t all"
-cmd="docker run --rm --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'"
+cmd="docker run --rm ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'"
echo "Running Functest k8s test cases, CMD: ${cmd}"
eval ${cmd}
ret_value=$?
+
+ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value"
+echo 0 > ${ret_val_file}
if [ ${ret_value} != 0 ]; then
echo ${ret_value} > ${ret_val_file}
fi