Termlist block test
authorDennis Schafroth <dennis@indexdata.com>
Fri, 4 Nov 2011 12:59:52 +0000 (13:59 +0100)
committerDennis Schafroth <dennis@indexdata.com>
Fri, 4 Nov 2011 12:59:52 +0000 (13:59 +0100)
test/test_termlist_block.cfg [new file with mode: 0644]
test/test_termlist_block.res [new file with mode: 0644]
test/test_termlist_block.sh [new file with mode: 0755]
test/test_termlist_block.urls [new file with mode: 0644]

diff --git a/test/test_termlist_block.cfg b/test/test_termlist_block.cfg
new file mode 100644 (file)
index 0000000..16425e2
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pazpar2 xmlns="http://www.indexdata.com/pazpar2/1.0">
+  <!-- Used by test_preferred.sh -->
+  <server>
+    <listen port="9763"/>
+    <proxy host="localhost"/>
+    
+    <service>
+      <include src="z3950_indexdata_com_marc.xml"/>
+      <metadata name="url" merge="unique"/>
+      <metadata name="title" brief="yes" sortkey="skiparticle" merge="longest" rank="6" mergekey="required" />
+      <metadata name="title-remainder" brief="yes" merge="longest" rank="5"/>
+      <metadata name="isbn"/>
+      <metadata name="date" brief="yes" sortkey="numeric" type="year" merge="range"
+               termlist="yes"/>
+      <metadata name="author" brief="yes" termlist="yes" merge="longest" rank="2" mergekey="optional" />
+      <metadata name="subject" merge="unique" termlist="yes" rank="3"/>
+      <metadata name="id"/>
+      <metadata name="lccn" merge="unique"/>
+      <metadata name="description" brief="yes" merge="longest" rank="3"/>
+      
+      <metadata name="test-usersetting" brief="yes" setting="postproc"/>
+      <metadata name="test" setting="parameter"/>
+      <metadata name="test-usersetting-2" brief="yes"/>
+    </service>
+
+    <include src="*_service.xml"/> 
+    <include src="no_such_service.xml"/>
+
+  </server>
+  
+  
+</pazpar2>
+<!-- Keep this comment at the end of the file
+     Local variables:
+     mode: nxml
+     End:
+-->
diff --git a/test/test_termlist_block.res b/test/test_termlist_block.res
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/test_termlist_block.sh b/test/test_termlist_block.sh
new file mode 100755 (executable)
index 0000000..e7b1203
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# srcdir might be set by make
+srcdir=${srcdir:-"."}
+
+#TODO set up solr target. For now use donut 
+#F=../solr/client.sh 
+#
+#rm -f solr.pid
+#$F -l solr.log -p ztest.pid -D @:9999
+#sleep 1
+#if test ! -f ztest.pid; then
+#    echo "yaz-ztest could not be started"
+#    exit 0
+#fi
+
+${srcdir}/run_pazpar2.sh test_termlist_block
+E=$?
+
+#kill `cat ztest.pid`
+#rm ztest.pid
+exit $E
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation: 2
+# sh-basic-offset: 4
+# End:
diff --git a/test/test_termlist_block.urls b/test/test_termlist_block.urls
new file mode 100644 (file)
index 0000000..07fd600
--- /dev/null
@@ -0,0 +1,11 @@
+http://localhost:9763/search.pz2?command=init&clear=1
+http://localhost:9763/search.pz2?session=1&command=settings&full_text_target%5Bid_ocw%5D=NO&use_url_proxy%5Bid_ocw%5D=0&pz:preferred%5Bid_ocw%5D=1&pz:piggyback%5Bid_ocw%5D=1&pz:authentication%5Bid_ocw%5D=idtest%2Fidtest36&pz:cclmap%3Asu%5Bid_ocw%5D=u%3D21+s%3Dal&use_thumbnails%5Bid_ocw%5D=1&pz:requestsyntax%5Bid_ocw%5D=xml&pz:name%5Bid_ocw%5D=MIT+OpenCourseWare&pz:cclmap%3Aissn%5Bid_ocw%5D=u%3D8&pz:cclmap%3Ati%5Bid_ocw%5D=u%3D4+s%3Dal&pz:cclmap%3Aau%5Bid_ocw%5D=u%3D1003+s%3Dal&pz:xslt%5Bid_ocw%5D=cf.xsl&pz:cclmap%3Aterm%5Bid_ocw%5D=u%3D1016+t%3Dl%2Cr+s%3Dal+2%3D102&pz:cclmap%3Aisbn%5Bid_ocw%5D=u%3D7&pz:queryencoding%5Bid_ocw%5D=UTF-8&pz:url%5Bid_ocw%5D=connect.indexdata.com%3A9000%2Fmit_opencourseware
+http://localhost:9763/search.pz2?session=1&command=search&query=su%3D%22computer%22
+4 http://localhost:9763/search.pz2?session=1&command=show&block=1
+http://localhost:9763/search.pz2?session=1&command=bytarget
+http://localhost:9763/search.pz2?session=1&command=termlist&block=1&name=xtargets%2Cauthor%2Csubject%2Cdate
+http://localhost:9763/search.pz2?session=1&command=settings&full_text_target%5Bid_solr%5D=NO&pz:termlist_term_count%5Bid_solr%5D=10&use_url_proxy%5Bid_solr%5D=0&pz:piggyback%5Bid_solr%5D=1&pz:preferred%5Bid_solr%5D=0&pz:block_timeout%5Bid_solr%5D=2&pz:cclmap%3Asu%5Bid_solr%5D=1%3Dsubject&pz:sru%5Bid_solr%5D=solr&use_thumbnails%5Bid_solr%5D=0&pz:name%5Bid_solr%5D=LOC+%28SOLR%29&pz:cclmap%3Aissn%5Bid_solr%5D=u%3D8&pz:cclmap%3Ati%5Bid_solr%5D=1%3Dtitle&pz:cclmap%3Aau%5Bid_solr%5D=1%3Dauthor&pz:xslt%5Bid_solr%5D=solr-pz2.xsl&pz:cclmap%3Aterm%5Bid_solr%5D=1%3Dtext+s%3Dal&pz:cclmap%3Aisbn%5Bid_solr%5D=1%3Disbn&pz:queryencoding%5Bid_solr%5D=UTF-8&pz:url%5Bid_solr%5D=ocs-test.indexdata.com%2Fsolr%2Fselect
+http://localhost:9763/search.pz2?session=1&command=search&query=su%3D%22computer%22
+4 http://localhost:9763/search.pz2?session=1&command=show&block=1
+http://localhost:9763/search.pz2?session=1&command=bytarget
+http://localhost:9763/search.pz2?session=1&command=termlist&block=1&name=xtargets%2Cauthor%2Csubject%2Cdate