summaryrefslogtreecommitdiffstats
path: root/distribution
diff options
context:
space:
mode:
authorNelson,Thomas(tn1381)(arthurdent3) <tn1381@att.com>2018-10-16 19:05:47 -0400
committerNelson,Thomas(tn1381)(arthurdent3) <tn1381@att.com>2018-10-16 19:34:30 -0400
commit4a0526db85bc28e3e10c9a0ee98474a24e3dcb4a (patch)
treecd435c8b3820b8eb5a77c13817976937cdbb3209 /distribution
parent714f843dd2bda27b8375db26e1e2aa9af94d1c93 (diff)
Update runcql
Change-Id: Ieedb7a180de8bd591c610d0846e33b3a95daad8d Issue-ID: MUSIC-147 Signed-off-by: Nelson,Thomas(tn1381)(arthurdent3) <tn1381@att.com>
Diffstat (limited to 'distribution')
-rw-r--r--distribution/cassandra_job/runcql.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/distribution/cassandra_job/runcql.sh b/distribution/cassandra_job/runcql.sh
index 078edf77..f935a350 100644
--- a/distribution/cassandra_job/runcql.sh
+++ b/distribution/cassandra_job/runcql.sh
@@ -1,12 +1,12 @@
#! /bin/bash
-re='^[0-9]+$'
-if [[ $TIMEOUT =~ $re ]]; then
- echo "TIMEOUT not set or error, defaulting to 10 seconds"
- TIMEOUT=10
+if [ -z "$TIMEOUT" ]; then
+ TIMEOUT=10;
fi
TO="--request-timeout=$TIMEOUT"
if [ $CASS_HOSTNAME ]; then
+ echo "Sleeping for 60 seconds before running cql";
+ sleep 60;
>&2 echo "#############################################"
>&2 echo "############## Let run cql's ################"
>&2 echo "#############################################"
@@ -71,9 +71,9 @@ if [ $CASS_HOSTNAME ]; then
fi
>&2 echo "Running Test - look for admin keyspace:"
- >&2 echo "Running cqlsh -u $DEF_USER -p $DEF_PASS -e "describe keyspaces;" ${CASS_HOSTNAME} ${PORT}"
+ >&2 echo "Running cqlsh -u $USERNAME -p $PASSWORD -e "select * from system_auth.roles;" ${CASS_HOSTNAME} ${PORT}"
sleep 1;
- if cqlsh $TO -u $DEF_USER -p $DEF_PASS -e "describe keyspaces;" ${CASS_HOSTNAME} ${PORT} | grep admin;
+ if cqlsh $TO -u $USERNAME -p $PASSWORD -e "select * from system_auth.roles;" ${CASS_HOSTNAME} ${PORT}
then
>&2 echo "Success - running test";
else