- added AuthZ test
authorMiloš Mulač <mulac@civ.zcu.cz>
Wed, 8 Feb 2006 15:06:24 +0000 (15:06 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Wed, 8 Feb 2006 15:06:24 +0000 (15:06 +0000)
org.glite.jp.index/Makefile
org.glite.jp.index/doc/README
org.glite.jp.index/test/authz.out [new file with mode: 0644]
org.glite.jp.index/test/run-test.sh

index 7fd19bc..599f060 100644 (file)
@@ -49,7 +49,7 @@ INSTALL:=libtool --mode=install install
 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_
index 1f72084..267b88a 100644 (file)
@@ -138,6 +138,17 @@ includes following tests:
 
        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.
diff --git a/org.glite.jp.index/test/authz.out b/org.glite.jp.index/test/authz.out
new file mode 100644 (file)
index 0000000..18e2d30
--- /dev/null
@@ -0,0 +1,14 @@
+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
index 53080b9..c6c34bc 100644 (file)
@@ -140,7 +140,7 @@ run_test_query() {
        $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
@@ -150,6 +150,7 @@ run_test_query() {
                cat $2
                echo "Obtained result (in /tmp/result):"
                cat /tmp/result
+               echo
                drop_db;
                kill_is;
                exit 1
@@ -201,4 +202,12 @@ run_test_feed;
 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;
+