From 2d3d8dcf6ef1bd2a161c69d561c629c5ec3f59c4 Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Thu, 27 Sep 2018 10:29:30 -0700 Subject: Move CSIT to integration/csit repo To facilite branching of CSIT tests, all CSIT test code and scripts are relocated to the integration/csit repo. Change-Id: I6777cd414e43dbf2bfa6215f7e50849e1a6a2e59 Issue-ID: INT-671 Signed-off-by: Gary Wu --- test/csit/scripts/policy/mock-hello.sh | 31 ------ test/csit/scripts/policy/script1.sh | 174 ------------------------------ test/csit/scripts/policy/wait_for_port.sh | 18 ---- 3 files changed, 223 deletions(-) delete mode 100755 test/csit/scripts/policy/mock-hello.sh delete mode 100755 test/csit/scripts/policy/script1.sh delete mode 100755 test/csit/scripts/policy/wait_for_port.sh (limited to 'test/csit/scripts/policy') diff --git a/test/csit/scripts/policy/mock-hello.sh b/test/csit/scripts/policy/mock-hello.sh deleted file mode 100755 index 6092dcba8..000000000 --- a/test/csit/scripts/policy/mock-hello.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# -# Copyright 2017 AT&T Intellectual Property. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# $1 ip address of the mock server - -curl -v -X PUT -d @- http://$1:1080/expectation < config/pe/ip_addr.txt -ls -l config/pe/ip_addr.txt -cat config/pe/ip_addr.txt - -export MTU=9126 - -export PRELOAD_POLICIES=false -docker-compose -f docker-compose-integration.yml up -d - -if [ ! $? -eq 0 ]; then - echo "Docker compose failed" - exit 1 -fi - -docker ps - -POLICY_IP=`docker inspect --format '{{ .NetworkSettings.Networks.docker_default.IPAddress}}' drools` -echo ${POLICY_IP} - -PDP_IP=`docker inspect --format '{{ .NetworkSettings.Networks.docker_default.IPAddress}}' pdp` -echo ${PDP_IP} - -PAP_IP=`docker inspect --format '{{ .NetworkSettings.Networks.docker_default.IPAddress}}' pap` -echo ${PAP_IP} - -BRMS_IP=`docker inspect --format '{{ .NetworkSettings.Networks.docker_default.IPAddress}}' brmsgw` -echo ${BRMS_IP} - -NEXUS_IP=`docker inspect --format '{{ .NetworkSettings.Networks.docker_default.IPAddress}}' nexus` -echo ${NEXUS_IP} - -MARIADB_IP=`docker inspect --format '{{ .NetworkSettings.Networks.docker_default.IPAddress}}' mariadb` -echo ${MARIADB_IP} - -sleep 5m - -netstat -tnl - -docker logs mariadb -${DIR}/wait_for_port.sh ${MARIADB_IP} 3306 - -docker logs pap -${DIR}/wait_for_port.sh ${PAP_IP} 9091 - -docker logs pdp -${DIR}/wait_for_port.sh ${PDP_IP} 8081 - -docker logs brmsgw -${DIR}/wait_for_port.sh ${BRMS_IP} 9989 - -docker logs nexus -${DIR}/wait_for_port.sh ${NEXUS_IP} 8081 - -docker logs drools -${DIR}/wait_for_port.sh ${POLICY_IP} 6969 - -TIME_OUT=600 -INTERVAL=20 -TIME=0 -while [ "$TIME" -lt "$TIME_OUT" ]; do - curl -k -i --user healthcheck:zb!XztG34 -H "ContentType: application/json" -H "Accept: application/json" https://${POLICY_IP}:6969/healthcheck && break - - echo Sleep: $INTERVAL seconds before testing if Policy is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds - sleep $INTERVAL - TIME=$(($TIME+$INTERVAL)) - -done - -TIME_OUT=600 -INTERVAL=20 -TIME=0 -while [ "$TIME" -lt "$TIME_OUT" ]; do - - curl -k -i -v -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'ClientAuth: cHl0aG9uOnRlc3Q=' -H 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' -H 'Environment: TEST' -X POST -d '{"policyName": ".*"}' https://${PDP_IP}:8081/pdp/api/getConfig && break - -echo Sleep: $INTERVAL seconds before testing if Policy is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds - sleep $INTERVAL - TIME=$(($TIME+$INTERVAL)) - -done - -# -# Add more sleep for everything to settle -# -sleep 3m diff --git a/test/csit/scripts/policy/wait_for_port.sh b/test/csit/scripts/policy/wait_for_port.sh deleted file mode 100755 index 10f08ded1..000000000 --- a/test/csit/scripts/policy/wait_for_port.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -if [[ $# -ne 2 ]]; then - echo "Usage: wait-for-port hostname port" >&2 - exit 1 -fi - -host=$1 -port=$2 - -echo "Waiting for $host port $port open" -until telnet $host $port /dev/null | grep -q '^Connected'; do - sleep 1 -done - -echo "$host port $port is open" - -exit 0 -- cgit 1.2.3-korg