aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/plans
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit/plans')
-rwxr-xr-xtest/csit/plans/appc/healthcheck/bundle_query.sh2
-rwxr-xr-xtest/csit/plans/appc/healthcheck/setup.sh74
2 files changed, 15 insertions, 61 deletions
diff --git a/test/csit/plans/appc/healthcheck/bundle_query.sh b/test/csit/plans/appc/healthcheck/bundle_query.sh
index f163ce5c2..45a92ea31 100755
--- a/test/csit/plans/appc/healthcheck/bundle_query.sh
+++ b/test/csit/plans/appc/healthcheck/bundle_query.sh
@@ -24,7 +24,7 @@ failed_bundles=$(docker exec appc_controller_container /opt/opendaylight/current
echo "There are $num_failed_bundles failed bundles out of $num_bundles installed bundles."
-if [ "$num_failed_bundles" -ge 1 ] || [ $num_bundles -le 400 ]; then
+if [ "$num_failed_bundles" -ge 1 ] || [ "$num_bundles" == "" ]; then
echo "There are $num_bundles bundles with $num_failed_bundles in a failed state. "
echo "The following bundle(s) are in a failed state: "
echo " $failed_bundles"
diff --git a/test/csit/plans/appc/healthcheck/setup.sh b/test/csit/plans/appc/healthcheck/setup.sh
index eaf488a65..8798e561a 100755
--- a/test/csit/plans/appc/healthcheck/setup.sh
+++ b/test/csit/plans/appc/healthcheck/setup.sh
@@ -24,7 +24,8 @@ export NEXUS_USERNAME=docker
export NEXUS_PASSWD=docker
export NEXUS_DOCKER_REPO=nexus3.onap.org:10001
export DMAAP_TOPIC=AUTO
-export DOCKER_IMAGE_VERSION=1.1.0-SNAPSHOT-latest
+export APPC_DOCKER_IMAGE_VERSION=1.1-STAGING-latest
+export CCSDK_DOCKER_IMAGE_VERSION=0.1-STAGING-latest
export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
@@ -39,54 +40,27 @@ cd $WORKSPACE/archives
git clone -b master --single-branch http://gerrit.onap.org/r/appc/deployment.git appc
cd $WORKSPACE/archives/appc
git pull
-unset http_proxy https_proxy
cd $WORKSPACE/archives/appc/docker-compose
-
sed -i "s/DMAAP_TOPIC_ENV=.*/DMAAP_TOPIC_ENV="$DMAAP_TOPIC"/g" docker-compose.yml
docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
-
-docker pull $NEXUS_DOCKER_REPO/openecomp/appc-image:$DOCKER_IMAGE_VERSION
-docker tag $NEXUS_DOCKER_REPO/openecomp/appc-image:$DOCKER_IMAGE_VERSION openecomp/appc-image:latest
-
-docker pull $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:latest
-docker tag $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:latest onap/ccsdk-dgbuilder-image:latest
-
+docker pull $NEXUS_DOCKER_REPO/openecomp/appc-image:$APPC_DOCKER_IMAGE_VERSION
+docker tag $NEXUS_DOCKER_REPO/openecomp/appc-image:$APPC_DOCKER_IMAGE_VERSION openecomp/appc-image:latest
+docker pull $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:$CCSDK_DOCKER_IMAGE_VERSION
+docker tag $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:$CCSDK_DOCKER_IMAGE_VERSION onap/ccsdk-dgbuilder-image:latest
# start APPC containers with docker compose and configuration from docker-compose.yml
docker-compose up -d
-
# WAIT 5 minutes maximum and test every 5 seconds if APPC is up using HealthCheck API
-TIME_OUT=500
+TIME_OUT=2000
INTERVAL=30
TIME=0
while [ "$TIME" -lt "$TIME_OUT" ]; do
- response=$(curl --write-out '%{http_code}' --silent --output /dev/null -H "Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==" -X POST -H "X-FromAppId: csit-appc" -H "X-TransactionId: csit-appc" -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:8282/restconf/operations/SLI-API:healthcheck ); echo $response
-
- if [ "$response" == "200" ]; then
- echo APPC started in $TIME seconds
- break;
- fi
-
- echo Sleep: $INTERVAL seconds before testing if APPC is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds
- sleep $INTERVAL
- TIME=$(($TIME+$INTERVAL))
-done
-
-if [ "$TIME" -ge "$TIME_OUT" ]; then
- echo TIME OUT: Docker containers not started in $TIME_OUT seconds... Could cause problems for testing activities...
-fi
-
-#sleep 800
-
-TIME_OUT=1000
-INTERVAL=60
-TIME=0
-while [ "$TIME" -lt "$TIME_OUT" ]; do
-response=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf system:start-level)
-num_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1)
+startODL_status=$(docker exec appc_controller_container ps -e | grep startODL | wc -l)
+waiting_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | grep Waiting | wc -l)
+run_level=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf system:start-level)
- if [ "$response" == "Level 100" ] && [ "$num_bundles" -ge 400 ]; then
- echo APPC karaf started in $TIME seconds
+ if [ "$run_level" == "Level 100" ] && [ "$startODL_status" -lt "1" ] && [ "$waiting_bundles" -lt "1" ] ; then
+ echo APPC started in $TIME seconds
break;
fi
@@ -96,30 +70,10 @@ num_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bi
done
if [ "$TIME" -ge "$TIME_OUT" ]; then
- echo TIME OUT: karaf session not started in $TIME_OUT seconds... Could cause problems for testing activities...
+ echo TIME OUT: Docker containers not started in $TIME_OUT seconds... Could cause problems for testing activities...
fi
-response=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf system:start-level)
-num_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1)
-
- if [ "$response" == "Level 100" ] && [ "$num_bundles" -ge 400 ]; then
- num_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | tail -1 | cut -d\| -f1)
- num_failed_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | grep Failure | wc -l)
- failed_bundles=$(docker exec appc_controller_container /opt/opendaylight/current/bin/client -u karaf bundle:list | grep Failure)
- echo There is/are $num_failed_bundles failed bundles out of $num_bundles installed bundles.
- fi
-
-if [ "$num_failed_bundles" -ge 1 ]; then
- echo "The following bundle(s) are in a failed state: "
- echo " $failed_bundles"
-fi
+sleep 300
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
ROBOT_VARIABLES="-v SCRIPTS:${SCRIPTS}"
-
-if [ "$response" == "" ] || [ "$num_bundles" == "" ]; then
- echo "Docker container appc_controller_container is not available. Exiting."
- exit 1
-fi
-
-