From c4c91f61eabe6ea0b0f26f770ce2f11ae91d0565 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Wed, 29 Jun 2011 09:36:10 +0000 Subject: [PATCH] Regression test for handling .lsc files --- .../gridsite/tests/gridsite-test-all.sh | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/org.glite.testsuites.ctb/gridsite/tests/gridsite-test-all.sh b/org.glite.testsuites.ctb/gridsite/tests/gridsite-test-all.sh index d9a051e..815f43d 100755 --- a/org.glite.testsuites.ctb/gridsite/tests/gridsite-test-all.sh +++ b/org.glite.testsuites.ctb/gridsite/tests/gridsite-test-all.sh @@ -370,6 +370,55 @@ EOF htproxydestroy --cert /etc/grid-security/hostcert.pem --key /etc/grid-security/hostkey.pem --capath /etc/grid-security/certificates --delegation-id $id https://$(hostname -f)/gridsite-delegation.cgi + printf "Test handling of VOMS .lsc files (Regression test for bug #39254 and #82023)\n" + + if [ -e /tmp/x509up_u`id -u` ]; then + + # Add read permissions for any user to .gacl + sed -i 's/<\/gacl>/<\/allow><\/entry><\/gacl>/' /var/www/htdocs/.gacl + + FQAN=`voms-proxy-info --fqan` + + rm -rf /etc/grid-security/vomsdir + printf "Trying without vomsdir. GRST_CRED_2 should not be present... " + GRST_CRED_2=`curl --cert /tmp/x509up_u0 --key /tmp/x509up_u0 --capath /etc/grid-security/certificates --silent https://$(hostname -f)/test.cgi|grep GRST_CRED_2` + if [ "$GRST_CRED_2" == "" ]; then + test_done + else + print_error "returned: $GRST_CRED_2\n" + test_failed + fi + + printf "Setting up .lsf file and trying again" + mkdir -p /etc/grid-security/vomsdir/voce/ + + cat > /etc/grid-security/vomsdir/voce/voms1.egee.cesnet.cz.lsc < /dev/null + if [ $? = 0 ]; then + test_done + else + print_error "returned: $GRST_CRED_2" + test_failed + fi + fi + + else + printf "No proxy certificate" + test_skipped + fi test_end -- 1.8.2.3