From 4c65a9347f4d591ab1bf2b469353d39bb29580d6 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 24 Sep 2009 08:41:30 +0200 Subject: [PATCH] Add test for POST of service. Add test script, config files, etc for POST of service for command=init. These were accidently omitted in commit fdf549621a2712e2e7fafd5966bbbf9a5c891adf. --- test/test_post.cfg | 18 ++++++++++++++++++ test/test_post.sh | 14 ++++++++++++++ test/test_post_1.res | 1 + test/test_post_3.res | 8 ++++++++ test/test_post_urls | 5 +++++ 5 files changed, 46 insertions(+) create mode 100644 test/test_post.cfg create mode 100755 test/test_post.sh create mode 100644 test/test_post_1.res create mode 100644 test/test_post_2.res create mode 100644 test/test_post_3.res create mode 100644 test/test_post_urls diff --git a/test/test_post.cfg b/test/test_post.cfg new file mode 100644 index 0000000..7939ada --- /dev/null +++ b/test/test_post.cfg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/test/test_post.sh b/test/test_post.sh new file mode 100755 index 0000000..c25a574 --- /dev/null +++ b/test/test_post.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# + +# srcdir might be set by make +srcdir=${srcdir:-"."} + +# Test using test_http.cfg +exec ${srcdir}/run_pazpar2.sh test_post + +# Local Variables: +# mode:shell-script +# sh-indentation: 2 +# sh-basic-offset: 4 +# End: diff --git a/test/test_post_1.res b/test/test_post_1.res new file mode 100644 index 0000000..ae5db74 --- /dev/null +++ b/test/test_post_1.res @@ -0,0 +1 @@ +OK11 \ No newline at end of file diff --git a/test/test_post_2.res b/test/test_post_2.res new file mode 100644 index 0000000..e69de29 diff --git a/test/test_post_3.res b/test/test_post_3.res new file mode 100644 index 0000000..d687e45 --- /dev/null +++ b/test/test_post_3.res @@ -0,0 +1,8 @@ + +OK +0 +0 +0 +0 +0 + diff --git a/test/test_post_urls b/test/test_post_urls new file mode 100644 index 0000000..c5eda38 --- /dev/null +++ b/test/test_post_urls @@ -0,0 +1,5 @@ +marc_service.xml +http://localhost:9763/search.pz2?command=init +http://localhost:9763/search.pz1?session=1&command=search&query=computer +1 +http://localhost:9763/search.pz1?session=1&command=show -- 1.7.10.4