fixed variable Autharization 35/64835/2
authorNelson,Thomas(tn1381)(arthurdent3) <tn1381@att.com>
Wed, 5 Sep 2018 18:06:45 +0000 (14:06 -0400)
committerNelson,Thomas(tn1381)(arthurdent3) <tn1381@att.com>
Wed, 5 Sep 2018 18:29:40 +0000 (14:29 -0400)
- update to print out tomcat logs for troubleshooting
- tomcat version Update
- teardown logging updated
- More logging to see why table is not there

Change-Id: Ia543e27e2875a08846dc6cc32060240b33c56409
Issue-ID: MUSIC-100
Signed-off-by: Nelson,Thomas(tn1381)(arthurdent3) <tn1381@att.com>
test/csit/plans/music/music-test-plan/setup.sh
test/csit/plans/music/music-test-plan/teardown.sh
test/csit/tests/music/music-suite/music-test.robot

index ddfdfc0..ce5d108 100755 (executable)
@@ -27,7 +27,7 @@ source ${WORKSPACE}/test/csit/scripts/music/music-scripts/music_script.sh
 echo "# music configuration step";
 
 CASS_IMG=nexus3.onap.org:10001/onap/music/cassandra_music:latest
-TOMCAT_IMG=nexus3.onap.org:10001/library/tomcat:8.0
+TOMCAT_IMG=nexus3.onap.org:10001/library/tomcat:8.5
 ZK_IMG=nexus3.onap.org:10001/library/zookeeper:3.4
 MUSIC_IMG=nexus3.onap.org:10001/onap/music/music:latest
 WORK_DIR=/tmp/music
@@ -38,6 +38,8 @@ MUSIC_PROPERTIES=/tmp/music/properties
 MUSIC_LOGS=/tmp/music/logs
 mkdir -p ${MUSIC_PROPERTIES}
 mkdir -p ${MUSIC_LOGS}
+mkdir -p ${MUSIC_LOGS}/MUSIC
+
 
 cp ${MUSIC_SOURCE_PROPERTIES}/* ${WORK_DIR}/properties
 
@@ -77,6 +79,19 @@ echo "TOMCAT_IP=${TOMCAT_IP}"
 
 ${WORKSPACE}/test/csit/scripts/music/music-scripts/wait_for_port.sh ${TOMCAT_IP} 8080
 
+sleep 20;
+echo "get the tomcat logs to make sure its running music properly"
+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 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 "inspect docker things for tracing purpose"
 docker inspect music-db
@@ -89,6 +104,7 @@ docker network inspect music-net
 echo "dump music content just after music is started"
 docker exec music-db /usr/bin/nodetool status
 docker exec music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM system_schema.keyspaces'
+docker exec music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'DESCRIBE keyspace admin'
 docker exec music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM admin.keyspace_master'
 
 
index e9982ae..a5f7423 100755 (executable)
 #
 # add here below the killing of all docker containers used for music CSIT testing
 #
+echo "dump music.log files"
+ls -alF /tmp/music
+ls -alFR /tmp/music
+ls -alF /tmp/music/properties
+cat /tmp/music/properties/music.properties
+echo "===== MUSIC log =================="
+docker exec music-tomcat /bin/bash -c "cat /opt/app/music/logs/MUSIC/music.log"
+#cat /tmp/music/logs/MUSIC/music.log
+echo "===== MUSIC error log =================="
+docker exec music-tomcat /bin/bash -c "cat /opt/app/music/logs/MUSIC/error.log"
+#cat /tmp/music/logs/MUSIC/error.log
+
 echo "##########################################################";
 echo "#";
 echo "# music scripts docker containers killing";
@@ -39,13 +51,6 @@ sleep 5;
 
 docker volume rm music-vol
 
-echo "dump music.log files"
-ls -alF /tmp/music
-ls -alF /tmp/music/properties
-cat /tmp/music/properties/music.properties
-cat /tmp/music/logs/MUSIC/music.log
-cat /tmp/music/logs/MUSIC/error.log
-
 #rm -Rf /tmp/music
 
 
index 9f8e435..9fc937e 100644 (file)
@@ -5,6 +5,9 @@ Library       json
 
 *** Variables ***
 ${MESSAGE}    {"ping": "ok"}
+${BASIC}    Basic
+${AUTHVALUE}    bXVzaWM6bXVzaWM=
+${Authorization}    ${BASIC} ${AUTHVALUE}
 
 #global variables
 ${generatedAID}
@@ -60,7 +63,7 @@ Music AddOnBoarding
     [Documentation]    It sends a REST POST request to Music to Onboard a new application
     Create Session   musicaas            ${MUSIC_HOSTNAME}:${MUSIC_PORT}
     ${data}=         Get Binary File     ${CURDIR}${/}data${/}onboard.json
-    &{headers}=      Create Dictionary    ns=lb7254    userId=music    password=music   Content-Type=application/json  Accept=application/json
+    &{headers}=      Create Dictionary    ns=lb7254    Authorization=${Authorization}   Content-Type=application/json  Accept=application/json
     ${resp}=         Post Request        musicaas   /MUSIC/rest/v2/admin/onboardAppWithMusic    data=${data}    headers=${headers}
     Log To Console              *********************
     Log To Console              response = ${resp}
@@ -75,7 +78,7 @@ Music CreateKeyspace
     [Documentation]    It sends a REST POST request to Music to create a new keyspace in Cassandra
     Create Session   musicaas            ${MUSIC_HOSTNAME}:${MUSIC_PORT}
     ${data}=         Get Binary File     ${CURDIR}${/}data${/}createkeyspace.json
-    &{headers}=      Create Dictionary    ns=lb7254    userId=music    password=music   aid=${generatedAID}   Content-Type=application/json  Accept=application/json
+    &{headers}=      Create Dictionary    ns=lb7254    Authorization=${Authorization}   aid=${generatedAID}   Content-Type=application/json  Accept=application/json
     ${resp}=         Post Request        musicaas   /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace    data=${data}    headers=${headers}
     Log To Console              *********************
     Log To Console              response = ${resp}
@@ -86,7 +89,7 @@ Music CreateTable
     [Documentation]    It sends a REST POST request to Music to create a new Table in Cassandra
     Create Session   musicaas            ${MUSIC_HOSTNAME}:${MUSIC_PORT}
     ${data}=         Get Binary File     ${CURDIR}${/}data${/}createtable.json
-    &{headers}=      Create Dictionary    ns=lb7254    userId=music    password=music   aid=${generatedAID}   Content-Type=application/json  Accept=application/json
+    &{headers}=      Create Dictionary    ns=lb7254    Authorization=${Authorization}   aid=${generatedAID}   Content-Type=application/json  Accept=application/json
     ${resp}=         Post Request        musicaas   /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable    data=${data}    headers=${headers}
     Log To Console              *********************
     Log To Console              response = ${resp}
@@ -97,7 +100,7 @@ Music InsertRow
     [Documentation]    It sends a REST POST request to Music to create a new row in Cassandra
     Create Session   musicaas            ${MUSIC_HOSTNAME}:${MUSIC_PORT}
     ${data}=         Get Binary File     ${CURDIR}${/}data${/}insertrow_eventual.json
-    &{headers}=      Create Dictionary    ns=lb7254    userId=music    password=music   aid=${generatedAID}   Content-Type=application/json  Accept=application/json
+    &{headers}=      Create Dictionary    ns=lb7254    Authorization=${Authorization}   aid=${generatedAID}   Content-Type=application/json  Accept=application/json
     ${resp}=         Post Request        musicaas   /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows/?row=emp1   data=${data}    headers=${headers}
     Log To Console              *********************
     Log To Console              response = ${resp}
@@ -107,7 +110,7 @@ Music InsertRow
 Music ReadRowJustInserted
     [Documentation]    It sends a REST GET request to Music to Read the row just inserted in Cassandra
     Create Session   musicaas            ${MUSIC_HOSTNAME}:${MUSIC_PORT}
-    &{headers}=      Create Dictionary    ns=lb7254    userId=music    password=music   aid=${generatedAID}   Content-Type=application/json  Accept=application/json
+    &{headers}=      Create Dictionary    ns=lb7254    Authorization=${Authorization}   aid=${generatedAID}   Content-Type=application/json  Accept=application/json
     ${resp}=         Get Request        musicaas   /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1   headers=${headers}
     Log To Console              *********************
     Log To Console              response = ${resp}
@@ -118,7 +121,7 @@ Music UpdateRowInAtomicWay
     [Documentation]    It sends a REST PUT request to Music to create a new row in Cassandra
     Create Session   musicaas            ${MUSIC_HOSTNAME}:${MUSIC_PORT}
     ${data}=         Get Binary File     ${CURDIR}${/}data${/}updaterow_atomic.json
-    &{headers}=      Create Dictionary    ns=lb7254    userId=music    password=music   aid=${generatedAID}   Content-Type=application/json  Accept=application/json
+    &{headers}=      Create Dictionary    ns=lb7254    Authorization=${Authorization}   aid=${generatedAID}   Content-Type=application/json  Accept=application/json
     ${resp}=         Put Request        musicaas   /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1   data=${data}    headers=${headers}
     Log To Console              *********************
     Log To Console              response = ${resp}
@@ -128,7 +131,7 @@ Music UpdateRowInAtomicWay
 Music ReadRowAfterUpdate
     [Documentation]    It sends a REST GET request to Music to Read the row just inserted in Cassandra
     Create Session   musicaas            ${MUSIC_HOSTNAME}:${MUSIC_PORT}
-    &{headers}=      Create Dictionary    ns=lb7254    userId=music    password=music   aid=${generatedAID}   Content-Type=application/json  Accept=application/json
+    &{headers}=      Create Dictionary    ns=lb7254    Authorization=${Authorization}   aid=${generatedAID}   Content-Type=application/json  Accept=application/json
     ${resp}=         Get Request        musicaas   /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1   headers=${headers}
     Log To Console              *********************
     Log To Console              response = ${resp}
@@ -139,7 +142,7 @@ Music DeleteRow
     [Documentation]    It sends a REST DELETE request to Music to delete a row in Cassandra
     Create Session   musicaas            ${MUSIC_HOSTNAME}:${MUSIC_PORT}
     ${data}=         Get Binary File     ${CURDIR}${/}data${/}deleterow_eventual.json
-    &{headers}=      Create Dictionary    ns=lb7254    userId=music    password=music   aid=${generatedAID}   Content-Type=application/json  Accept=application/json
+    &{headers}=      Create Dictionary    ns=lb7254    Authorization=${Authorization}   aid=${generatedAID}   Content-Type=application/json  Accept=application/json
     ${resp}=         Delete Request        musicaas   /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1   data=${data}    headers=${headers}
     Log To Console              *********************
     Log To Console              response = ${resp}
@@ -150,7 +153,7 @@ Music DropTable
     [Documentation]    It sends a REST Delete request to Music to drop one existing Table in Cassandra
     Create Session   musicaas            ${MUSIC_HOSTNAME}:${MUSIC_PORT}
     ${data}=         Get Binary File     ${CURDIR}${/}data${/}droptable.json
-    &{headers}=      Create Dictionary    ns=lb7254    userId=music    password=music   aid=${generatedAID}   Content-Type=application/json   Accept=application/json
+    &{headers}=      Create Dictionary    ns=lb7254    Authorization=${Authorization}   aid=${generatedAID}   Content-Type=application/json   Accept=application/json
     ${resp}=         Delete Request        musicaas   /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable    data=${data}    headers=${headers}
     Log To Console              *********************
     Log To Console              response = ${resp}
@@ -161,7 +164,7 @@ Music DropKeyspace
     [Documentation]    It sends a REST DELETE request to Music to drop one existing keyspace in Cassandra
     Create Session   musicaas            ${MUSIC_HOSTNAME}:${MUSIC_PORT}
     ${data}=         Get Binary File     ${CURDIR}${/}data${/}dropkeyspace.json
-    &{headers}=      Create Dictionary    ns=lb7254    userId=music    password=music   aid=${generatedAID}   Content-Type=application/json   Accept=application/json
+    &{headers}=      Create Dictionary    ns=lb7254    Authorization=${Authorization}   aid=${generatedAID}   Content-Type=application/json   Accept=application/json
     ${resp}=         Delete Request        musicaas   /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace    data=${data}    headers=${headers}
     Log To Console              *********************
     Log To Console              response = ${resp}
@@ -173,7 +176,7 @@ Music DeleteOnBoarding
     [Documentation]    It sends a REST DELETE request to Music to remove a previosly onboarded application
     Create Session   musicaas             ${MUSIC_HOSTNAME}:${MUSIC_PORT}
     ${data}=         Get Binary File     ${CURDIR}${/}data${/}onboard.json
-    &{headers}=      Create Dictionary    ns=lb7254    userId=music    password=music   aid=${generatedAID}   Content-Type=application/json   Accept=application/json
+    &{headers}=      Create Dictionary    ns=lb7254    Authorization=${Authorization}   aid=${generatedAID}   Content-Type=application/json   Accept=application/json
     ${resp}=         Delete Request        musicaas   /MUSIC/rest/v2/admin/onboardAppWithMusic    data=${data}    headers=${headers}
     Log To Console              *********************
     Log To Console              response = ${resp}