aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/plans
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2018-04-03 09:22:06 -0700
committerKiran Kamineni <kiran.k.kamineni@intel.com>2018-04-03 10:34:28 -0700
commiteaac220bb37ef8afe0be93553accb894997da8f6 (patch)
tree1718e275187f7511bae1426c66fa43f6a3c63fcc /test/csit/plans
parent6515d690ba20e2859b5bcb109a858f85dcb36a40 (diff)
Fixing broken CSIT by 40573
SMS CSIT was broken because of patch 40573 This patch should fix that issue Issue-ID: AAF-189 Change-Id: I4a26841e833237ad485ca62fa76262b1832c5946 Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'test/csit/plans')
-rwxr-xr-xtest/csit/plans/aaf/sms-test-plan/setup.sh40
-rw-r--r--test/csit/plans/aaf/sms-test-plan/teardown.sh3
2 files changed, 29 insertions, 14 deletions
diff --git a/test/csit/plans/aaf/sms-test-plan/setup.sh b/test/csit/plans/aaf/sms-test-plan/setup.sh
index 5d1973ad8..9f77b698e 100755
--- a/test/csit/plans/aaf/sms-test-plan/setup.sh
+++ b/test/csit/plans/aaf/sms-test-plan/setup.sh
@@ -22,38 +22,50 @@ CONFIG_FILE=$(pwd)/config/smsconfig.json
mkdir -p $(pwd)/config
+docker login -u docker -p docker nexus3.onap.org:10001
+docker pull nexus3.onap.org:10001/onap/aaf/sms
+docker pull docker.io/vault:0.9.5
+
+#
+# Running vault in dev server mode here for CSIT
+# In HELM it runs in production mode
+#
+docker run -e "VAULT_DEV_ROOT_TOKEN_ID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" \
+ -e SKIP_SETCAP=true \
+ --name vault -d -p 8200:8200 vault:0.9.5
+
+SMSDB_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' vault)
cat << EOF > $CONFIG_FILE
{
"cafile": "auth/selfsignedca.pem",
"servercert": "auth/server.cert",
"serverkey": "auth/server.key",
- "vaultaddress": "http://$HOSTNAME:8200",
+ "smsdbaddress": "http://$SMSDB_IP:8200",
"vaulttoken": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"disable_tls": true
}
EOF
-docker login -u docker -p docker nexus3.onap.org:10001
-docker pull nexus3.onap.org:10001/onap/aaf/sms
-docker pull docker.io/vault:0.9.5
-#
-# Running vault in dev server mode here for CSIT
-# In HELM it runs in production mode
-#
-docker run -e "VAULT_DEV_ROOT_TOKEN_ID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" \
- -e SKIP_SETCAP=true \
- --name vault -d -p 8200:8200 vault:0.9.5
-docker run --workdir /sms -v "$(pwd)"/config/smsconfig.json:/sms/smsconfig.json \
+cat $CONFIG_FILE
+
+docker run --workdir /sms -v $CONFIG_FILE:/sms/smsconfig.json \
--name sms -d -p 10443:10443 nexus3.onap.org:10001/onap/aaf/sms
+SMS_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' sms)
+
echo "###### WAITING FOR ALL CONTAINERS TO COME UP"
-sleep 10
+sleep 20
+for i in {1..20}; do
+ curl -sS -m 1 http://${SMSDB_IP}:8200/v1/sys/seal-status && break
+ echo sleep $i
+ sleep $i
+done
#
# add here all ROBOT_VARIABLES settings
#
echo "# sms robot variables settings";
-ROBOT_VARIABLES="-v SMS_HOSTNAME:http://localhost -v SMS_PORT:10443"
+ROBOT_VARIABLES="-v SMS_HOSTNAME:http://${SMS_IP} -v SMS_PORT:10443"
echo ${ROBOT_VARIABLES}
diff --git a/test/csit/plans/aaf/sms-test-plan/teardown.sh b/test/csit/plans/aaf/sms-test-plan/teardown.sh
index 72f134f0d..d6fa32924 100644
--- a/test/csit/plans/aaf/sms-test-plan/teardown.sh
+++ b/test/csit/plans/aaf/sms-test-plan/teardown.sh
@@ -15,6 +15,9 @@
# limitations under the License.
#
+docker cp sms:/sms/sms.log .
+cat sms.log
+rm sms.log
rm -rf config
docker stop sms vault
docker rm sms vault