From: Zdeněk Šustr Date: Wed, 20 Jan 2010 15:41:34 +0000 (+0000) Subject: Extended to also check HTTPS interface to nitifications X-Git-Tag: glite-lb-harvester_R_1_0_3_1~14 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=44a7379cbbde0f265d1b7fb447a8582e61b5ca09;p=jra1mw.git Extended to also check HTTPS interface to nitifications --- diff --git a/org.glite.testsuites.ctb/LB/tests/lb-test-https.sh b/org.glite.testsuites.ctb/LB/tests/lb-test-https.sh index d4160b6..219f786 100755 --- a/org.glite.testsuites.ctb/LB/tests/lb-test-https.sh +++ b/org.glite.testsuites.ctb/LB/tests/lb-test-https.sh @@ -12,6 +12,8 @@ Prerequisities: - environment variables set: GLITE_LB_SERVER_PORT - if nondefault port (9000) is used + GLITE_WMS_QUERY_SERVER + GLITE_WMS_NOTIF_SERVER Tests called: @@ -176,6 +178,65 @@ else fi + # Register notification: + printf "Registering notification " + + notifid=`${LBNOTIFY} new -j ${jobid} | $SYS_GREP "notification ID" | ${SYS_AWK} '{ print $3 }'` + echo ${LBNOTIFY} new -j ${jobid} + + if [ -z $notifid ]; then + test_failed + print_error "Failed to register notification" + else + printf "(${notifid}) " + test_done + + # Get notification status + printf "Evaluating notification status listing... " + + $SYS_CURL -3 --silent --key $PROXYCERT --cert $PROXYCERT --capath /etc/grid-security/certificates --output https.$$.tmp "${notifid}" + + if [ "$?" != "0" ]; then + test_failed + print_error "Job status not returned" + else + test_done + + printf "Checking for jobid (verifying content)..." + + notifunique=`${SYS_ECHO} ${notifid} | ${SYS_SED} 's/^.*NOTIF://'` + + $SYS_GREP $notifunique https.$$.tmp > /dev/null 2> /dev/null + + if [ "$?" != "0" ]; then + test_failed + print_error "Notification ID not found among data returned" + else + test_done + fi + + rm https.$$.tmp + + fi + + #Drop notification + printf "Dropping the test notification (${notifid})" + dropresult=`${LBNOTIFY} drop ${notifid} 2>&1` + if [ -z $dropresult ]; then + test_done + else + test_failed + print_error "Failed to drop notification ${dropresult}" + fi + + #Purge test job + joblist=$$_jobs_to_purge.txt + echo $jobid > ${joblist} + try_purge ${joblist} + + + fi + fi