daemon:=glite-jp-indexd
examples:=glite-jpis-test glite-jpis-client
test:=run-test.sh
-test_files:=dump1.sql simple_query.in simple_query.out complex_query.in complex_query.out
+test_files:=dump1.sql simple_query.in simple_query.out complex_query.in complex_query.out authz.out
is_prefix:=jpis_
is_client_prefix:=jpis_client_
ps_prefix:=jpps_
Test query has form (status=Done OR status=Ready) AND (user!=God).
+* AuthZ test
+- behaves exactly as simple query, except the fact that the index server
+ does compare query owner with jobs owner. These two differ and result
+ should be empty answer.
+- scenario that checking ownership is swithed off (IS with -n option) is
+ covered by Simple query test
+- scenario that only user jobs are returned and no others is covered by
+ Feed & query test
+
+
+
The testing shell script is highly configurable via environmental varibles.
Please, run the script (run-test.sh) with '-?' option to get list of all
variables and their meaning, if you are not satisfied with default setting.
--- /dev/null
+query: using JPIS http://localhost:10000
+
+Conditions:
+ http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus
+ == Ready
+Attributes:
+ http://egee.cesnet.cz/en/Schema/JP/System:owner
+ http://egee.cesnet.cz/en/Schema/JP/System:jobId
+ http://egee.cesnet.cz/en/Schema/LB/Attributes:finalStatus
+ http://egee.cesnet.cz/en/Schema/LB/Attributes:user
+
+OK
+Result 0 jobs:
+<?xml version="1.0" encoding="UTF-8"?><jpisclient:QueryJobsResponse xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jptype="http://glite.org/wsdl/types/jp" xmlns:jpsrv="http://glite.org/wsdl/services/jp" xmlns:jpelem="http://glite.org/wsdl/elements/jp" xmlns:jpisclient="http://glite.org/xsd/types/jpisclient"></jpisclient:QueryJobsResponse>
\ No newline at end of file
$GLITE_LOCATION/stage/examples/glite-jpis-client -q $1 \
-i http://localhost:$GLITE_JPIS_TEST_PORT &>/tmp/result
DIFF=`diff --ignore-matching-lines="query: using JPIS" $2 /tmp/result`
- if [ -z "$DIFF" ] ; then
+ if [ -z "$DIFF" -a "$?" -eq "0" ] ; then
echo "OK."
rm /tmp/result
else
cat $2
echo "Obtained result (in /tmp/result):"
cat /tmp/result
+ echo
drop_db;
kill_is;
exit 1
drop_db;
kill_is;
+echo -n "Authz test........... "
+create_db;
+run_is;
+import_db $GLITE_LOCATION/stage/examples/dump1.sql;
+run_test_query $GLITE_LOCATION/stage/examples/simple_query.in $GLITE_LOCATION/stage/examples/authz.out;
+drop_db;
+kill_is;
+