fi
return 0
}
+
+function check_srv_version()
+{
+ check_binaries $LBWSGETVERSION
+ if [ $? -gt 0 ]; then
+ return 2
+ 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
+ return 2
+ else
+
+ SRVVER=`$SYS_ECHO $wsglservver | $SYS_GREP -o -E "^[0-9]+\.[0-9]+"`
+ CHKVER=`$SYS_ECHO $2 | $SYS_GREP -o -E "^[0-9]*\.[0-9*]"`
+
+ printf "Srv. version $SRVVER $1 $CHKVER? "
+ cresult=`$SYS_EXPR $SRVVER $1 $CHKVER`
+ if [ "$cresult" -eq "1" ]; then
+ printf "yes "
+ return 0
+ else
+ printf "no "
+ return 1
+ fi
+ fi
+ fi
+ return 0
+}
#####################
identity="ThisIsJustATestingIdentity"
-test_tag_acl=${TEST_TAG_ACL:-"no"}
{
test_start
fi
test_done
+ check_srv_version '>=' "2.2"
+ if [ $? -gt 0 ]; then
+ test_tag_acl="no"
+ test_done
+ else
+ test_tag_acl="yes"
+ test_done
+ fi
+
printf "Testing Tags permissions... "
if [ "$test_tag_acl" != "yes" ]; then
printf "Capability not detected..."
print_error "Failed to register job"
break
fi
+ printf " $jobid"
test_done
printf "Changing ACL..."
fi
test_done
-
printf "Checking ACL for new values... "
ops="read"
[ "$test_tag_acl" = "yes" ] && ops="$ops write"
done
# redirecting all output to $logfile
-touch $logfile
-if [ ! -w $logfile ]; then
- echo "Cannot write to output file $logfile"
- exit $TEST_ERROR
-fi
+#touch $logfile
+#if [ ! -w $logfile ]; then
+# echo "Cannot write to output file $logfile"
+# exit $TEST_ERROR
+#fi
DEBUG=2
RETURN=2
RETURN=1
+ check_srv_version '>=' "2.2"
+ if [ $? -gt 0 ]; then
+ printf "Capability not detected. This test will be"
+ test_skipped
+ break
+ else
+ test_done
+ fi
+
# Register job:
printf "Registering job "
jobid=`${LBJOBREG} -m ${GLITE_WMS_QUERY_SERVER} -s application 2>&1 | $SYS_GREP "new jobid" | ${SYS_AWK} '{ print $3 }'`