Test query attribute for job types
authorZdeněk Šustr <sustr4@cesnet.cz>
Thu, 9 Aug 2012 06:33:46 +0000 (06:33 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Thu, 9 Aug 2012 06:33:46 +0000 (06:33 +0000)
org.glite.testsuites.ctb/LB/tests/lb-test-job-states.sh

index 395a94c..b3c47b8 100755 (executable)
@@ -275,6 +275,25 @@ while [ "$CONT" = "yes" ]; do
                $SYS_GREP $jobid query_output.$$.txt > /dev/null 2> /dev/null
                if [ $? -eq 0 ]; then test_failed && print_error "Test job included among results" && cat query_output.$$.txt; else test_done; fi
 
+               check_srv_version '>=' "2.4"
+               if [ $? -eq 0 ]; then
+                       test_done
+
+                       printf "EDG_WLL_QUERY_ATTR_JOB_TYPE... "
+                       printf "job_type=simple\njobid<>\"https://$GLITE_WMS_QUERY_SERVER/none\"\n" > query_input.$$.txt
+                       ${LBQUERYEXT} -C -m $GLITE_WMS_QUERY_SERVER -i query_input.$$.txt > query_output.$$.txt 2> /dev/null
+                       $SYS_GREP $jobid query_output.$$.txt > /dev/null 2> /dev/null
+                       if [ $? -gt 0 ]; then test_failed && print_error "Test job not included among results" && cat query_output.$$.txt; else test_done; fi
+
+                       printf "EDG_WLL_QUERY_ATTR_JOB_TYPE... negative"
+                       printf "job_type<>simple\njobid<>\"https://$GLITE_WMS_QUERY_SERVER/none\"\n" > query_input.$$.txt
+                       ${LBQUERYEXT} -C -m $GLITE_WMS_QUERY_SERVER -i query_input.$$.txt > query_output.$$.txt 2> /dev/null
+                       $SYS_GREP $jobid query_output.$$.txt > /dev/null 2> /dev/null
+                       if [ $? -eq 0 ]; then test_failed && print_error "Test job included among results" && cat query_output.$$.txt; else test_done; fi
+               else
+                       test_skipped
+               fi
+
                $SYS_RM query_input.$$.txt query_output.$$.txt job.$$.jdl
        else
                test_skipped