Begin work on PP2 WS HTTP test.
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 15 May 2007 08:56:03 +0000 (08:56 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 15 May 2007 08:56:03 +0000 (08:56 +0000)
src/Makefile.am
src/test_http.cfg [new file with mode: 0644]
src/test_http.sh [new file with mode: 0755]
src/test_http.xml [new file with mode: 0644]

index fde2a7f..21f2e53 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.20 2007-05-10 11:46:09 adam Exp $
+# $Id: Makefile.am,v 1.21 2007-05-15 08:56:03 adam Exp $
 
 bin_PROGRAMS = pazpar2
 check_PROGRAMS = test_config \
@@ -8,8 +8,11 @@ check_PROGRAMS = test_config \
       test_relevance \
       test_sel_thread
 
+check_SCRIPTS = test_http.sh
 
-TESTS = $(check_PROGRAMS)
+EXTRA_DIST = test_http.xml test_http.cfg $(check_SCRIPTS)
+
+TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
 
 noinst_LIBRARIES = libpazpar2.a
 
diff --git a/src/test_http.cfg b/src/test_http.cfg
new file mode 100644 (file)
index 0000000..ec07815
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pazpar2 xmlns="http://www.indexdata.com/pazpar2/1.0">
+<!-- $Id: test_http.cfg,v 1.1 2007-05-15 08:56:03 adam Exp $ -->
+<!-- Used by test_http.sh -->
+<server>
+  <listen port="9763"/>
+  <proxy host="localhost"/>
+  <settings src="../etc/settings"/>
+
+  <service>
+    <metadata name="url" merge="unique"/>
+    <metadata name="title" brief="yes" sortkey="skiparticle" merge="longest" rank="6"/>
+    <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"/>
+    <metadata name="subject" merge="unique" termlist="yes" rank="3"/>
+    <metadata name="id"/>
+    <metadata name="lccn" merge="unique"/>
+    <metadata name="description" merge="longest" rank="3"/>
+  </service>
+</server>
+
+<targetprofiles type="local" src="../zeerex/records/"/>
+
+</pazpar2>
diff --git a/src/test_http.sh b/src/test_http.sh
new file mode 100755 (executable)
index 0000000..ed76cc6
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+# $Id: test_http.sh,v 1.1 2007-05-15 08:56:03 adam Exp $
+srcdir=${srcdir:-"."}
+./pazpar2 -f ${srcdir}/test_http.cfg -t ${srcdir}/test_http.xml >test_http.log 2>&1 &
+PP2PID=$!
+sleep 1
+if ps -p $PP2PID >/dev/null 2>&1; then
+    :
+    # echo "Started OK PID=$PP2PID"
+else
+    echo "pazpar2 failed to start"
+    exit 1
+fi
+
+kill $PP2PID
+exit 0
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation: 2
+# sh-basic-offset: 4
+# End:
diff --git a/src/test_http.xml b/src/test_http.xml
new file mode 100644 (file)
index 0000000..5f5a905
--- /dev/null
@@ -0,0 +1,28 @@
+<settings target="localhost:9999/Default">
+
+  <!-- Used by test test_http.sh -->
+  <!-- $Id: test_http.xml,v 1.1 2007-05-15 08:56:03 adam Exp $ -->
+
+  <set name="pz:name" value="Local Test"/>
+
+  <!-- mapping for unqualified search -->
+  <set name="pz:cclmap:term" value="u=1016 t=l,r s=al"/>
+
+  <!-- field-specific mappings -->
+  <set name="pz:cclmap:ti" value="u=4 s=al"/>
+  <set name="pz:cclmap:su" value="u=21 s=al"/>
+  <set name="pz:cclmap:isbn" value="u=7"/>
+  <set name="pz:cclmap:issn" value="u=8"/>
+  <set name="pz:cclmap:date" value="u=30 r=r"/>
+
+  <!-- Retrieval settings -->
+
+  <set name="pz:requestsyntax" value="marc21"/>
+  <!-- <set name="pz:elements" value="F"/> NOT YET IMPLEMENTED -->
+
+  <!-- Result normalization settings -->
+
+  <set name="pz:nativesyntax" value="iso2709"/>
+  <set name="pz:xslt" value="../etc/marc21.xsl"/>
+
+</settings>