aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/plans
diff options
context:
space:
mode:
authorNelson,Thomas(tn1381)(arthurdent3) <tn1381@att.com>2018-09-21 00:18:34 -0400
committerNelson,Thomas(tn1381)(arthurdent3) <tn1381@att.com>2018-09-21 02:09:52 -0400
commit31420245bdd75c7955504619310582f1e4c9cbd0 (patch)
treedbbbf002c9c10657196ea5380997218e8b0eb176 /test/csit/plans
parent5d7183c56ee613b5fb3f03ff2f64a6a0ed646e86 (diff)
Update to add Trigger
Downloading and setting up Jar for cassandra Minor Fix Missing ; in cql file..... Change-Id: I15c699bac6c13982657d61fa61451f8fa16e5789 Issue-ID: MUSIC-138 Signed-off-by: Nelson,Thomas(tn1381)(arthurdent3) <tn1381@att.com>
Diffstat (limited to 'test/csit/plans')
-rwxr-xr-xtest/csit/plans/music/music-test-plan/setup.sh26
1 files changed, 19 insertions, 7 deletions
diff --git a/test/csit/plans/music/music-test-plan/setup.sh b/test/csit/plans/music/music-test-plan/setup.sh
index 6ed31b74b..7775bc52b 100755
--- a/test/csit/plans/music/music-test-plan/setup.sh
+++ b/test/csit/plans/music/music-test-plan/setup.sh
@@ -39,10 +39,18 @@ MUSIC_SOURCE_PROPERTIES=${WORKSPACE}/test/csit/scripts/music/music-properties
MUSIC_PROPERTIES=/tmp/music/properties
MUSIC_LOGS=/tmp/music/logs
CQL_FILES=${WORKSPACE}/test/csit/scripts/music/cql
+MUSIC_TRIGGER_DIR=/tmp/triggers
+TRIGGER_JAR=musictrigger-0.1.0.jar
+TRIGGER_JAR_URL=https://nexus.onap.org/service/local/repositories/autorelease-72298/content/org/onap/music/musictrigger/0.1.0/musictrigger-0.1.0.jar
+
mkdir -p ${MUSIC_PROPERTIES}
mkdir -p ${MUSIC_LOGS}
mkdir -p ${MUSIC_LOGS}/MUSIC
+mkdir -p /tmp/triggers
+# Get Trigger
+echo "########## Get Trigger Jar ##########"
+curl -o $MUSIC_TRIGGER_DIR/$TRIGGER_JAR $TRIGGER_JAR_URL
cp ${MUSIC_SOURCE_PROPERTIES}/* ${WORK_DIR}/properties
@@ -56,7 +64,9 @@ docker network create music-net;
# Start Cassandra
echo "########## Start Cassandra (music-db) ##########"
-docker run -d --name music-db --network music-net -p "7000:7000" -p "7001:7001" -p "7199:7199" -p "9042:9042" -p "9160:9160" -e CASSUSER=${CASS_USERNAME} -e CASSPASS=${CASS_PASSWORD} ${CASS_IMG};
+docker run -d --name music-db --network music-net -p "7000:7000" -p "7001:7001" -p "7199:7199" -p "9042:9042" -p "9160:9160" \
+-v $MUSIC_TRIGGER_DIR/$TRIGGER_JAR:/etc/cassandra/triggers/$TRIGGER_JAR \
+${CASS_IMG};
CASSA_IP=`docker inspect -f '{{ $network := index .NetworkSettings.Networks "music-net" }}{{ $network.IPAddress}}' music-db`
echo "CASSANDRA_IP=${CASSA_IP}"
@@ -64,7 +74,9 @@ ${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${CASSA_IP} 9042
# See if cassandra is up.
echo "########## Running Test to see if Cassandra is up ##########"
-docker run --name music-casstest --network music-net $BUSYBOX_IMG sh -c "until nc -z music-db 9042 && echo "success"; do echo 'No connection .. Sleeping for $TT seconds';sleep $TT; done;"
+docker run --name music-casstest --network music-net \
+$BUSYBOX_IMG sh -c "until nc -z music-db 9042 && echo "success"; do echo 'No connection .. Sleeping for $TT seconds';sleep $TT; done;"
+
# Check to see if Keyspaces are there.
docker exec music-db cqlsh -u cassandra -p cassandra -e "DESCRIBE keyspaces;"
@@ -75,7 +87,7 @@ echo "########## Running Cassandra Job (music-job) to load cql files ##########"
docker run -d --name music-job --network music-net \
-v $CQL_FILES/admin.cql:/cql/admin.cql \
-v $CQL_FILES/admin_pw.cql:/cql/admin_pw.cql \
--v $CQL_FILES/test.cql:/cql/extra/test.cql \
+-v $CQL_FILES/extra:/cql/extra \
-e PORT=9042 \
-e CASS_HOSTNAME=music-db \
-e USERNAME=$CASS_USERNAME \
@@ -116,14 +128,14 @@ sleep 20;
echo "########## TOMCAT Logs ##########"
docker logs music-tomcat
# Needed only if we need to look at localhost logs.
-#echo "########## MUSIC localhost Log ##########"
-#docker exec music-tomcat /bin/bash -c "cat /usr/local/tomcat/logs/localhost*"
+echo "########## MUSIC localhost Log ##########"
+docker exec music-tomcat /bin/bash -c "cat /usr/local/tomcat/logs/localhost*"
echo "########## MUSIC Log ##########"
ls -al $MUSIC_LOGS/MUSIC
docker exec music-tomcat /bin/bash -c "cat /opt/app/music/logs/MUSIC/music.log"
-echo "########## MUSIC error log ##########"
-docker exec music-tomcat /bin/bash -c "cat /opt/app/music/logs/MUSIC/error.log"
+#echo "########## MUSIC error log ##########"
+#docker exec music-tomcat /bin/bash -c "cat /opt/app/music/logs/MUSIC/error.log"
echo "########## inspect docker things for tracing purpose ##########"
docker inspect music-db