INSTALLPKGS="lintian"
else
INSTALLCMD="yum install -q -y --nogpgcheck"
- INSTALLPKGS="rpmlint"
+ INSTALLPKGS="rpmlint postgresql-server"
fi
cat << EndArrangeScript > arrange_lb_test_root.sh
export LBTSTCOLS
-${INSTALLCMD} globus-proxy-utils postgresql postgresql-server voms-clients curl wget sudo bc $INSTALLPKGS
+${INSTALLCMD} globus-proxy-utils postgresql voms-clients curl wget sudo bc $INSTALLPKGS
/etc/init.d/postgresql initdb >/dev/null 2>&1
/etc/init.d/postgresql start
rm -rf /tmp/test-certs/grid-security
cvs -d :pserver:anonymous@glite.cvs.cern.ch:/cvs/jra1mw co org.glite.testsuites.ctb/LB > /dev/null 2>/dev/null
FAKE_CAS=\`./org.glite.testsuites.ctb/LB/tests/lb-generate-fake-proxy.sh | grep -E "^X509_CERT_DIR" | sed 's/X509_CERT_DIR=//'\`
- if [ "\$FAKE_CAS" == "" ]; then
+ if [ "\$FAKE_CAS" = "" ]; then
echo "Failed generating proxy" >&2
exit 2
else
echo 'env | egrep "GLITE|\$HNAME|PATH"' >> arrange_lb_test_user.sh
echo pwd >> arrange_lb_test_user.sh
echo id >> arrange_lb_test_user.sh
-if [ "\$OUTPUT_OPT" == "-i" ]; then
+if [ "\$OUTPUT_OPT" = "-i" ]; then
echo echo ======================== >> arrange_lb_test_user.sh
echo echo " THE CONSOLE IS YOURS" >> arrange_lb_test_user.sh
echo echo ======================== >> arrange_lb_test_user.sh
else
servername=`echo ${GLITE_WMS_QUERY_SERVER} | ${SYS_SED} "s/:.*//"`
wsglservver=`$LBWSGETVERSION -m ${servername}:${GLITE_LB_SERVER_WPORT} | $SYS_SED 's/^.*Server version:\s*//'`
- if [ "$wsglservver" == "" ]; then
+ if [ "$wsglservver" = "" ]; then
return 2
else
fi
printf "L&B server: '$remotehost'\n"
-if [ "$remotehost" == "" ]; then
+if [ "$remotehost" = "" ]; then
printf "L&B server not specified, exittig...\n\n"
exit 1
fi
fi
fi
-if [ "$PROXYCERT" == "" ]; then
+if [ "$PROXYCERT" = "" ]; then
PROXYCERT="none"
fi
printf "Checking ServiceStatus (Regression into bug #76174)... "
health=`$SYS_GREP GlueServiceStatus: ldap.$$.out | $SYS_SED 's/^[^:]*: *//'`
-if [ "$health" == "" ]; then
+if [ "$health" = "" ]; then
print_error "GlueServiceStatus not specified"
test_failed
else
printf "$health"
- if [ "$health" == "OK" ]; then
+ if [ "$health" = "OK" ]; then
test_done
else
test_failed
printf "Checking GLUE2 HealthStatus (Regression into bug #76173)... "
health=`$SYS_GREP GLUE2EndpointHealthState: ldap.$$.out | $SYS_TAIL -n 1 | $SYS_SED 's/^[^:]*: *//'`
-if [ "$health" == "" ]; then
+if [ "$health" = "" ]; then
print_error "GLUE2EndpointHealthState not specified"
test_failed
else
printf "$health"
- if [ "$health" == "ok" ]; then
+ if [ "$health" = "ok" ]; then
test_done
else
test_failed
printf "Checking GlueServiceVersion (Regression into bug #55482)... "
glservver=`$SYS_GREP GLUE2EndpointImplementationVersion ldap.$$.out | $SYS_TAIL -n 1 | $SYS_SED 's/^.*GLUE2EndpointImplementationVersion:\s*//'`
-if [ "$glservver" == "" ]; then
+if [ "$glservver" = "" ]; then
print_error "GLUE2EndpointImplementationVersion not specified"
test_failed
else
test_done
printf "Reading version through WS... "
- if [ "$WSBIN" == "yes" ]; then
+ if [ "$WSBIN" = "yes" ]; then
servername=`echo ${GLITE_WMS_QUERY_SERVER} | ${SYS_SED} "s/:.*//"`
wsglservver=`$LBWSGETVERSION -m ${servername}:${GLITE_LB_SERVER_WPORT} | $SYS_SED 's/^.*Server version:\s*//'`
- if [ "$wsglservver" == "" ]; then
+ if [ "$wsglservver" = "" ]; then
test_failed
else
printf "$wsglservver"
test_done
- printf "Comparing versions: '$glservver' == '$wsglservver'"
- if [ "$glservver" == "$wsglservver" ]; then
+ printf "Comparing versions: '$glservver' = '$wsglservver'"
+ if [ "$glservver" = "$wsglservver" ]; then
test_done
else
test_failed
printf "Downloading remote configuration... "
$SSL_CMD https://${GLITE_WMS_QUERY_SERVER}/?configuration > https.$$.tmp
LineNO=`$SYS_WC -l https.$$.tmp | $SYS_AWK '{ print $1 }' `
- if [ ! "$LineNO" == "0" ]; then
+ if [ ! "$LineNO" = "0" ]; then
test_done
printf "Checking for items... "
for item in msg_brokers msg_prefixes
do
printf "$item... "
$SYS_GREP -E "$item.*=" https.$$.tmp > /dev/null
- if [ "$?" == "0" ]; then
+ if [ "$?" = "0" ]; then
test_done
else
test_failed
printf "Checking statistics... "
$SSL_CMD https://${GLITE_WMS_QUERY_SERVER}/?stats > https.$$.tmp
LineNO=`$SYS_WC -l https.$$.tmp | $SYS_AWK '{ print $1 }' `
- if [ ! "$LineNO" == "0" ]; then
+ if [ ! "$LineNO" = "0" ]; then
test_done
printf "Checking for items that should be > 0... "
for item in "gLite job regs" "Notification regs.*legacy" "HTML accesses" "Plain text accesses"
do
printf "$item... "
ItLine=`$SYS_GREP -E "$item" https.$$.tmp`
- if [ "$?" == "0" ]; then
+ if [ "$?" = "0" ]; then
ItValue=`$SYS_ECHO $ItLine | $SYS_GREP -o -E -i "<td>[0-9]+</td>" | $SYS_GREP -o -E -i "[0-9]+"`
printf "$ItValue "
if [ "$ItValue" != "" -a $ItValue -gt 0 ]; then
test_done
fi
- if [ ! $BROKER == "" ]; then
+ if [ ! $BROKER = "" ]; then
#Start listening for notifications
printf "Checking if client supports output files... "
rudver=`${LBCMSCLIENT} | $SYS_GREP '\-o'`
- if [ "$rudver" == "" ]; then
+ if [ "$rudver" = "" ]; then
printf "No. Connecting to broker $BROKER, topic grid.emi.lbtest"
${LBCMSCLIENT} ${BROKER} grid.emi.lbtest 2>&1 > $$_notifications.txt &
recpid=$!
printf "($doneCode)"
- if [ "$doneCode" == "" ]; then
+ if [ "$doneCode" = "" ]; then
test_done
else
test_failed
printf "Getting server version... "
servername=`echo ${GLITE_WMS_QUERY_SERVER} | ${SYS_SED} "s/:.*//"`
wsglservver=`$LBWSGETVERSION -m ${servername}:${GLITE_LB_SERVER_WPORT} | $SYS_SED 's/^.*Server version:\s*//'`
- if [ "$wsglservver" == "" ]; then
+ if [ "$wsglservver" = "" ]; then
test_failed
else
printf "$wsglservver"
check_srv_version '>=' "2.2"
if [ $? = 0 ]; then
wsglifver=`$LBWSGETVERSION -i -m ${servername}:${GLITE_LB_SERVER_WPORT} | $SYS_SED 's/^.*Interface version:\s*//'`
- if [ "$wsglifver" == "" ]; then
+ if [ "$wsglifver" = "" ]; then
test_failed
else
printf "$wsglifver"
printf "Check if test runs on server... "
localname=`$SYS_HOSTNAME -f`
- if [ "$servername" == "$localname" ]; then
+ if [ "$servername" = "$localname" ]; then
printf "Get rpm version... "
rpmversion=`$SYS_RPM -qi glite-lb-ws-interface | $SYS_GREP -E "^Version" | $SYS_SED 's/^Version\s*:\s*//' | $SYS_SED 's/\s.*$//'`
- if [ "$rpmversion" == "" ]; then
+ if [ "$rpmversion" = "" ]; then
printf "Unable to detect rpm version"
test_skipped
else
printf "$rpmversion"
test_done
- printf "Comparing versions ($wsglifver == $rpmversion)... "
+ printf "Comparing versions ($wsglifver = $rpmversion)... "
- if [ "$wsglifver" == "$rpmversion" ]; then
+ if [ "$wsglifver" = "$rpmversion" ]; then
test_done
else
test_failed
rm -rf /tmp/test-certs/grid-security
cvs -d :pserver:anonymous@glite.cvs.cern.ch:/cvs/jra1mw co org.glite.testsuites.ctb/LB > /dev/null 2>/dev/null
FAKE_CAS=\`source ./org.glite.testsuites.ctb/LB/tests/lb-generate-fake-proxy.sh --lsc | grep -E "^X509_CERT_DIR" | sed 's/X509_CERT_DIR=//'\`
- if [ "\$FAKE_CAS" == "" ]; then
+ if [ "\$FAKE_CAS" = "" ]; then
echo "Failed generating proxy" >&2
exit 2
else
echo 'env | egrep "GLITE|\$HNAME|PATH"' >> arrange_px_test_user.sh
echo pwd >> arrange_px_test_user.sh
echo id >> arrange_px_test_user.sh
-if [ "\$OUTPUT_OPT" == "-i" ]; then
+if [ "\$OUTPUT_OPT" = "-i" ]; then
echo echo ======================== >> arrange_px_test_user.sh
echo echo " THE CONSOLE IS YOURS" >> arrange_px_test_user.sh
echo echo ======================== >> arrange_px_test_user.sh
exit 2
fi
-if [ "$x509_USER_CERT" == "" -o "$x509_USER_KEY" == "" ]; then
+if [ "$x509_USER_CERT" = "" -o "$x509_USER_KEY" = "" ]; then
source ./lb-generate-fake-proxy.sh --hours 1
fi
printf "Getting registered proxy... "
REGISTERED_PROXY=`glite-proxy-renew -s localhost -f $ORIG_PROXY -j $JOBID start`
-if [ "$REGISTERED_PROXY" == "" ]; then
+if [ "$REGISTERED_PROXY" = "" ]; then
test_failed
print_error "Could not set renewal"
exit 1
fi
FAKE_CAS=`sh ./lb-generate-fake-proxy.sh --lsc | grep -E "^X509_CERT_DIR" | sed 's/X509_CERT_DIR=//'`
-if [ "$FAKE_CAS" == "" ]; then
+if [ "$FAKE_CAS" = "" ]; then
echo "Failed generating proxy" >&2
exit 2
else
cvs -d :pserver:anonymous@glite.cvs.cern.ch:/cvs/jra1mw co org.glite.testsuites.ctb/LB > /dev/null 2>/dev/null
./org.glite.testsuites.ctb/LB/tests/lb-generate-fake-proxy.sh > fake-prox.out.\$\$
FAKE_CAS=\`cat fake-prox.out.\$\$ | grep -E "^X509_CERT_DIR" | sed 's/X509_CERT_DIR=//'\`
- if [ "\$FAKE_CAS" == "" ]; then
+ if [ "\$FAKE_CAS" = "" ]; then
echo "Failed generating proxy" >&2
exit 2
else
mv -f /etc/grid-security/vomsdir/* /tmp/vomsdir.$$/
printf "Trying with empty 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
+ if [ "$GRST_CRED_2" = "" ]; then
test_done
else
print_error "returned: $GRST_CRED_2\n"
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
+ if [ "$GRST_CRED_2" = "" ]; then
print_error "GRST_CRED_2 not returned"
test_failed
else
printf "Test listing of VOMS attributes (Regression test for bug #92077)\n"
GRST_CRED_AURI=`curl --cert /tmp/x509up_u0 --key /tmp/x509up_u0 --capath /etc/grid-security/certificates --silent https://$(hostname -f)/test.cgi|grep -E GRST_CRED_AURI.*Testers`
- if [ "$GRST_CRED_AURI" == "" ]; then
+ if [ "$GRST_CRED_AURI" = "" ]; then
test_failed
print_error "attribute not present"
else