Author: jsdelfino
Date: Mon Jul 19 02:27:31 2010
New Revision: 965342
URL: http://svn.apache.org/viewvc?rev=965342&view=rev
Log:
Add more JSON and ATOMPub test cases.
Added:
tuscany/sca-cpp/trunk/modules/server/htdocs/test/
tuscany/sca-cpp/trunk/modules/server/htdocs/test/entry.xml
- copied, changed from r965145,
tuscany/sca-cpp/trunk/modules/server/htdocs/entry.xml
tuscany/sca-cpp/trunk/modules/server/htdocs/test/feed.xml
- copied, changed from r965145,
tuscany/sca-cpp/trunk/modules/server/htdocs/feed.xml
tuscany/sca-cpp/trunk/modules/server/htdocs/test/json-request.txt
- copied, changed from r965145,
tuscany/sca-cpp/trunk/modules/server/htdocs/json-request.txt
tuscany/sca-cpp/trunk/modules/server/htdocs/test/json-result.txt
- copied, changed from r965145,
tuscany/sca-cpp/trunk/modules/server/htdocs/json-result.txt
tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/
tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/entry.xml
- copied, changed from r965145,
tuscany/sca-cpp/trunk/modules/wsgi/htdocs/entry.xml
tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/feed.xml
- copied, changed from r965145,
tuscany/sca-cpp/trunk/modules/wsgi/htdocs/feed.xml
tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/json-request.txt
- copied, changed from r965145,
tuscany/sca-cpp/trunk/modules/wsgi/htdocs/json-request.txt
tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/json-result.txt
- copied, changed from r965145,
tuscany/sca-cpp/trunk/modules/wsgi/htdocs/json-result.txt
tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/
tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/getcatalog-request.txt
tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/getcatalog-result.txt
tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/shopping-cart-entry.xml
Removed:
tuscany/sca-cpp/trunk/modules/server/htdocs/entry.xml
tuscany/sca-cpp/trunk/modules/server/htdocs/feed.xml
tuscany/sca-cpp/trunk/modules/server/htdocs/json-request.txt
tuscany/sca-cpp/trunk/modules/server/htdocs/json-result.txt
tuscany/sca-cpp/trunk/modules/wsgi/htdocs/entry.xml
tuscany/sca-cpp/trunk/modules/wsgi/htdocs/feed.xml
tuscany/sca-cpp/trunk/modules/wsgi/htdocs/json-request.txt
tuscany/sca-cpp/trunk/modules/wsgi/htdocs/json-result.txt
Modified:
tuscany/sca-cpp/trunk/modules/java/wiring-test
tuscany/sca-cpp/trunk/modules/python/wiring-test
tuscany/sca-cpp/trunk/modules/server/httpd-test
tuscany/sca-cpp/trunk/modules/server/wiring-test
tuscany/sca-cpp/trunk/modules/wsgi/wiring-test
tuscany/sca-cpp/trunk/modules/wsgi/wsgi-test
tuscany/sca-cpp/trunk/samples/store-cpp/server-test
tuscany/sca-cpp/trunk/samples/store-java/server-test
tuscany/sca-cpp/trunk/samples/store-nosql/server-test
tuscany/sca-cpp/trunk/samples/store-python/server-test
tuscany/sca-cpp/trunk/samples/store-scheme/server-test
tuscany/sca-cpp/trunk/samples/store-sql/server-test
tuscany/sca-cpp/trunk/samples/store-vhost/server-test
Modified: tuscany/sca-cpp/trunk/modules/java/wiring-test
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/java/wiring-test?rev=965342&r1=965341&r2=965342&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/java/wiring-test (original)
+++ tuscany/sca-cpp/trunk/modules/java/wiring-test Mon Jul 19 02:27:31 2010
@@ -43,20 +43,20 @@ rc=$?
# Test ATOMPub
if [ "$rc" = "0" ]; then
$curl_prefix/bin/curl http://localhost:8090/client/ >tmp/feed.xml
2>/dev/null
- diff tmp/feed.xml ../server/htdocs/feed.xml
+ diff tmp/feed.xml ../server/htdocs/test/feed.xml
rc=$?
fi
if [ "$rc" = "0" ]; then
$curl_prefix/bin/curl http://localhost:8090/client/111 >tmp/entry.xml
2>/dev/null
- diff tmp/entry.xml ../server/htdocs/entry.xml
+ diff tmp/entry.xml ../server/htdocs/test/entry.xml
rc=$?
fi
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/client/ -X POST -H
"Content-type: application/atom+xml" --data @../server/htdocs/entry.xml
2>/dev/null
+ $curl_prefix/bin/curl http://localhost:8090/client/ -X POST -H
"Content-type: application/atom+xml" --data @../server/htdocs/test/entry.xml
2>/dev/null
rc=$?
fi
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/client/111 -X PUT -H
"Content-type: application/atom+xml" --data @../server/htdocs/entry.xml
2>/dev/null
+ $curl_prefix/bin/curl http://localhost:8090/client/111 -X PUT -H
"Content-type: application/atom+xml" --data @../server/htdocs/test/entry.xml
2>/dev/null
rc=$?
fi
if [ "$rc" = "0" ]; then
@@ -66,8 +66,8 @@ fi
# Test JSON-RPC
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/client/ -X POST -H
"Content-type: application/json-rpc" --data @../server/htdocs/json-request.txt
>tmp/json-result.txt 2>/dev/null
- diff tmp/json-result.txt ../server/htdocs/json-result.txt
+ $curl_prefix/bin/curl http://localhost:8090/client/ -X POST -H
"Content-type: application/json-rpc" --data
@../server/htdocs/test/json-request.txt >tmp/json-result.txt 2>/dev/null
+ diff tmp/json-result.txt ../server/htdocs/test/json-result.txt
rc=$?
fi
Modified: tuscany/sca-cpp/trunk/modules/python/wiring-test
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/python/wiring-test?rev=965342&r1=965341&r2=965342&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/python/wiring-test (original)
+++ tuscany/sca-cpp/trunk/modules/python/wiring-test Mon Jul 19 02:27:31 2010
@@ -41,20 +41,20 @@ rc=$?
# Test ATOMPub
if [ "$rc" = "0" ]; then
$curl_prefix/bin/curl http://localhost:8090/client/ >tmp/feed.xml
2>/dev/null
- diff tmp/feed.xml ../server/htdocs/feed.xml
+ diff tmp/feed.xml ../server/htdocs/test/feed.xml
rc=$?
fi
if [ "$rc" = "0" ]; then
$curl_prefix/bin/curl http://localhost:8090/client/111 >tmp/entry.xml
2>/dev/null
- diff tmp/entry.xml ../server/htdocs/entry.xml
+ diff tmp/entry.xml ../server/htdocs/test/entry.xml
rc=$?
fi
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/client/ -X POST -H
"Content-type: application/atom+xml" --data @../server/htdocs/entry.xml
2>/dev/null
+ $curl_prefix/bin/curl http://localhost:8090/client/ -X POST -H
"Content-type: application/atom+xml" --data @../server/htdocs/test/entry.xml
2>/dev/null
rc=$?
fi
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/client/111 -X PUT -H
"Content-type: application/atom+xml" --data @../server/htdocs/entry.xml
2>/dev/null
+ $curl_prefix/bin/curl http://localhost:8090/client/111 -X PUT -H
"Content-type: application/atom+xml" --data @../server/htdocs/test/entry.xml
2>/dev/null
rc=$?
fi
if [ "$rc" = "0" ]; then
@@ -64,8 +64,8 @@ fi
# Test JSON-RPC
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/client/ -X POST -H
"Content-type: application/json-rpc" --data @../server/htdocs/json-request.txt
>tmp/json-result.txt 2>/dev/null
- diff tmp/json-result.txt ../server/htdocs/json-result.txt
+ $curl_prefix/bin/curl http://localhost:8090/client/ -X POST -H
"Content-type: application/json-rpc" --data
@../server/htdocs/test/json-request.txt >tmp/json-result.txt 2>/dev/null
+ diff tmp/json-result.txt ../server/htdocs/test/json-result.txt
rc=$?
fi
Copied: tuscany/sca-cpp/trunk/modules/server/htdocs/test/entry.xml (from
r965145, tuscany/sca-cpp/trunk/modules/server/htdocs/entry.xml)
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/htdocs/test/entry.xml?p2=tuscany/sca-cpp/trunk/modules/server/htdocs/test/entry.xml&p1=tuscany/sca-cpp/trunk/modules/server/htdocs/entry.xml&r1=965145&r2=965342&rev=965342&view=diff
==============================================================================
(empty)
Copied: tuscany/sca-cpp/trunk/modules/server/htdocs/test/feed.xml (from
r965145, tuscany/sca-cpp/trunk/modules/server/htdocs/feed.xml)
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/htdocs/test/feed.xml?p2=tuscany/sca-cpp/trunk/modules/server/htdocs/test/feed.xml&p1=tuscany/sca-cpp/trunk/modules/server/htdocs/feed.xml&r1=965145&r2=965342&rev=965342&view=diff
==============================================================================
(empty)
Copied: tuscany/sca-cpp/trunk/modules/server/htdocs/test/json-request.txt (from
r965145, tuscany/sca-cpp/trunk/modules/server/htdocs/json-request.txt)
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/htdocs/test/json-request.txt?p2=tuscany/sca-cpp/trunk/modules/server/htdocs/test/json-request.txt&p1=tuscany/sca-cpp/trunk/modules/server/htdocs/json-request.txt&r1=965145&r2=965342&rev=965342&view=diff
==============================================================================
(empty)
Copied: tuscany/sca-cpp/trunk/modules/server/htdocs/test/json-result.txt (from
r965145, tuscany/sca-cpp/trunk/modules/server/htdocs/json-result.txt)
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/htdocs/test/json-result.txt?p2=tuscany/sca-cpp/trunk/modules/server/htdocs/test/json-result.txt&p1=tuscany/sca-cpp/trunk/modules/server/htdocs/json-result.txt&r1=965145&r2=965342&rev=965342&view=diff
==============================================================================
(empty)
Modified: tuscany/sca-cpp/trunk/modules/server/httpd-test
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/httpd-test?rev=965342&r1=965341&r2=965342&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/server/httpd-test (original)
+++ tuscany/sca-cpp/trunk/modules/server/httpd-test Mon Jul 19 02:27:31 2010
@@ -41,20 +41,20 @@ rc=$?
# Test ATOMPub
if [ "$rc" = "0" ]; then
$curl_prefix/bin/curl http://localhost:8090/test/ >tmp/feed.xml 2>/dev/null
- diff tmp/feed.xml htdocs/feed.xml
+ diff tmp/feed.xml htdocs/test/feed.xml
rc=$?
fi
if [ "$rc" = "0" ]; then
$curl_prefix/bin/curl http://localhost:8090/test/111 >tmp/entry.xml
2>/dev/null
- diff tmp/entry.xml htdocs/entry.xml
+ diff tmp/entry.xml htdocs/test/entry.xml
rc=$?
fi
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/test/ -X POST -H
"Content-type: application/atom+xml" --data @htdocs/entry.xml 2>/dev/null
+ $curl_prefix/bin/curl http://localhost:8090/test/ -X POST -H
"Content-type: application/atom+xml" --data @htdocs/test/entry.xml 2>/dev/null
rc=$?
fi
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/test/111 -X PUT -H
"Content-type: application/atom+xml" --data @htdocs/entry.xml 2>/dev/null
+ $curl_prefix/bin/curl http://localhost:8090/test/111 -X PUT -H
"Content-type: application/atom+xml" --data @htdocs/test/entry.xml 2>/dev/null
rc=$?
fi
if [ "$rc" = "0" ]; then
@@ -64,8 +64,8 @@ fi
# Test JSON-RPC
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/test/ -X POST -H
"Content-type: application/json-rpc" --data @htdocs/json-request.txt
>tmp/json-result.txt 2>/dev/null
- diff tmp/json-result.txt htdocs/json-result.txt
+ $curl_prefix/bin/curl http://localhost:8090/test/ -X POST -H
"Content-type: application/json-rpc" --data @htdocs/test/json-request.txt
>tmp/json-result.txt 2>/dev/null
+ diff tmp/json-result.txt htdocs/test/json-result.txt
rc=$?
fi
Modified: tuscany/sca-cpp/trunk/modules/server/wiring-test
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/wiring-test?rev=965342&r1=965341&r2=965342&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/server/wiring-test (original)
+++ tuscany/sca-cpp/trunk/modules/server/wiring-test Mon Jul 19 02:27:31 2010
@@ -41,20 +41,20 @@ rc=$?
# Test ATOMPub
if [ "$rc" = "0" ]; then
$curl_prefix/bin/curl http://localhost:8090/client/ >tmp/feed.xml
2>/dev/null
- diff tmp/feed.xml htdocs/feed.xml
+ diff tmp/feed.xml htdocs/test/feed.xml
rc=$?
fi
if [ "$rc" = "0" ]; then
$curl_prefix/bin/curl http://localhost:8090/client/111 >tmp/entry.xml
2>/dev/null
- diff tmp/entry.xml htdocs/entry.xml
+ diff tmp/entry.xml htdocs/test/entry.xml
rc=$?
fi
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/client/ -X POST -H
"Content-type: application/atom+xml" --data @htdocs/entry.xml 2>/dev/null
+ $curl_prefix/bin/curl http://localhost:8090/client/ -X POST -H
"Content-type: application/atom+xml" --data @htdocs/test/entry.xml 2>/dev/null
rc=$?
fi
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/client/111 -X PUT -H
"Content-type: application/atom+xml" --data @htdocs/entry.xml 2>/dev/null
+ $curl_prefix/bin/curl http://localhost:8090/client/111 -X PUT -H
"Content-type: application/atom+xml" --data @htdocs/test/entry.xml 2>/dev/null
rc=$?
fi
if [ "$rc" = "0" ]; then
@@ -64,8 +64,8 @@ fi
# Test JSON-RPC
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/client/ -X POST -H
"Content-type: application/json-rpc" --data @htdocs/json-request.txt
>tmp/json-result.txt 2>/dev/null
- diff tmp/json-result.txt htdocs/json-result.txt
+ $curl_prefix/bin/curl http://localhost:8090/client/ -X POST -H
"Content-type: application/json-rpc" --data @htdocs/test/json-request.txt
>tmp/json-result.txt 2>/dev/null
+ diff tmp/json-result.txt htdocs/test/json-result.txt
rc=$?
fi
Copied: tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/entry.xml (from r965145,
tuscany/sca-cpp/trunk/modules/wsgi/htdocs/entry.xml)
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/entry.xml?p2=tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/entry.xml&p1=tuscany/sca-cpp/trunk/modules/wsgi/htdocs/entry.xml&r1=965145&r2=965342&rev=965342&view=diff
==============================================================================
(empty)
Copied: tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/feed.xml (from r965145,
tuscany/sca-cpp/trunk/modules/wsgi/htdocs/feed.xml)
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/feed.xml?p2=tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/feed.xml&p1=tuscany/sca-cpp/trunk/modules/wsgi/htdocs/feed.xml&r1=965145&r2=965342&rev=965342&view=diff
==============================================================================
(empty)
Copied: tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/json-request.txt (from
r965145, tuscany/sca-cpp/trunk/modules/wsgi/htdocs/json-request.txt)
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/json-request.txt?p2=tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/json-request.txt&p1=tuscany/sca-cpp/trunk/modules/wsgi/htdocs/json-request.txt&r1=965145&r2=965342&rev=965342&view=diff
==============================================================================
(empty)
Copied: tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/json-result.txt (from
r965145, tuscany/sca-cpp/trunk/modules/wsgi/htdocs/json-result.txt)
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/json-result.txt?p2=tuscany/sca-cpp/trunk/modules/wsgi/htdocs/test/json-result.txt&p1=tuscany/sca-cpp/trunk/modules/wsgi/htdocs/json-result.txt&r1=965145&r2=965342&rev=965342&view=diff
==============================================================================
(empty)
Modified: tuscany/sca-cpp/trunk/modules/wsgi/wiring-test
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/wsgi/wiring-test?rev=965342&r1=965341&r2=965342&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/wsgi/wiring-test (original)
+++ tuscany/sca-cpp/trunk/modules/wsgi/wiring-test Mon Jul 19 02:27:31 2010
@@ -38,20 +38,20 @@ rc=$?
# Test ATOMPub
if [ "$rc" = "0" ]; then
$curl_prefix/bin/curl $uri/client/ >tmp/feed.xml 2>/dev/null
- diff tmp/feed.xml htdocs/feed.xml
+ diff tmp/feed.xml htdocs/test/feed.xml
rc=$?
fi
if [ "$rc" = "0" ]; then
$curl_prefix/bin/curl $uri/client/111 >tmp/entry.xml 2>/dev/null
- diff tmp/entry.xml htdocs/entry.xml
+ diff tmp/entry.xml htdocs/test/entry.xml
rc=$?
fi
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl $uri/client/ -X POST -H "Content-type:
application/atom+xml" --data @htdocs/entry.xml 2>/dev/null
+ $curl_prefix/bin/curl $uri/client/ -X POST -H "Content-type:
application/atom+xml" --data @htdocs/test/entry.xml 2>/dev/null
rc=$?
fi
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl $uri/client/111 -X PUT -H "Content-type:
application/atom+xml" --data @htdocs/entry.xml 2>/dev/null
+ $curl_prefix/bin/curl $uri/client/111 -X PUT -H "Content-type:
application/atom+xml" --data @htdocs/test/entry.xml 2>/dev/null
rc=$?
fi
if [ "$rc" = "0" ]; then
@@ -61,8 +61,8 @@ fi
# Test JSON-RPC
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl $uri/client/ -X POST -H "Content-type:
application/json-rpc" --data @htdocs/json-request.txt >tmp/json-result.txt
2>/dev/null
- diff tmp/json-result.txt htdocs/json-result.txt
+ $curl_prefix/bin/curl $uri/client/ -X POST -H "Content-type:
application/json-rpc" --data @htdocs/test/json-request.txt >tmp/json-result.txt
2>/dev/null
+ diff tmp/json-result.txt htdocs/test/json-result.txt
rc=$?
fi
Modified: tuscany/sca-cpp/trunk/modules/wsgi/wsgi-test
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/wsgi/wsgi-test?rev=965342&r1=965341&r2=965342&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/wsgi/wsgi-test (original)
+++ tuscany/sca-cpp/trunk/modules/wsgi/wsgi-test Mon Jul 19 02:27:31 2010
@@ -34,20 +34,20 @@ rc=$?
# Test ATOMPub
if [ "$rc" = "0" ]; then
$curl_prefix/bin/curl http://localhost:8090/wsgi/ >tmp/feed.xml 2>/dev/null
- diff tmp/feed.xml htdocs/feed.xml
+ diff tmp/feed.xml htdocs/test/feed.xml
rc=$?
fi
if [ "$rc" = "0" ]; then
$curl_prefix/bin/curl http://localhost:8090/wsgi/111 >tmp/entry.xml
2>/dev/null
- diff tmp/entry.xml htdocs/entry.xml
+ diff tmp/entry.xml htdocs/test/entry.xml
rc=$?
fi
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/wsgi/ -X POST -H
"Content-type: application/atom+xml" --data @htdocs/entry.xml 2>/dev/null
+ $curl_prefix/bin/curl http://localhost:8090/wsgi/ -X POST -H
"Content-type: application/atom+xml" --data @htdocs/test/entry.xml 2>/dev/null
rc=$?
fi
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/wsgi/111 -X PUT -H
"Content-type: application/atom+xml" --data @htdocs/entry.xml 2>/dev/null
+ $curl_prefix/bin/curl http://localhost:8090/wsgi/111 -X PUT -H
"Content-type: application/atom+xml" --data @htdocs/test/entry.xml 2>/dev/null
rc=$?
fi
if [ "$rc" = "0" ]; then
@@ -57,8 +57,8 @@ fi
# Test JSON-RPC
if [ "$rc" = "0" ]; then
- $curl_prefix/bin/curl http://localhost:8090/wsgi/ -X POST -H
"Content-type: application/json-rpc" --data @htdocs/json-request.txt
>tmp/json-result.txt 2>/dev/null
- diff tmp/json-result.txt htdocs/json-result.txt
+ $curl_prefix/bin/curl http://localhost:8090/wsgi/ -X POST -H
"Content-type: application/json-rpc" --data @htdocs/test/json-request.txt
>tmp/json-result.txt 2>/dev/null
+ diff tmp/json-result.txt htdocs/test/json-result.txt
rc=$?
fi
Added:
tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/getcatalog-request.txt
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/getcatalog-request.txt?rev=965342&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/getcatalog-request.txt
(added)
+++ tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/getcatalog-request.txt
Mon Jul 19 02:27:31 2010
@@ -0,0 +1 @@
+{"id": 1, "method": "getcatalog", "params": []}
Added: tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/getcatalog-result.txt
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/getcatalog-result.txt?rev=965342&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/getcatalog-result.txt
(added)
+++ tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/getcatalog-result.txt
Mon Jul 19 02:27:31 2010
@@ -0,0 +1 @@
+{"id":1,"result":[{"javaClass":"services.Item","name":"Apple","currencyCode":"USD","currencySymbol":"$","price":2.99},{"javaClass":"services.Item","name":"Orange","currencyCode":"USD","currencySymbol":"$","price":3.55},{"javaClass":"services.Item","name":"Pear","currencyCode":"USD","currencySymbol":"$","price":1.55}]}
\ No newline at end of file
Added:
tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/shopping-cart-entry.xml
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/shopping-cart-entry.xml?rev=965342&view=auto
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/shopping-cart-entry.xml
(added)
+++ tuscany/sca-cpp/trunk/samples/store-cpp/htdocs/test/shopping-cart-entry.xml
Mon Jul 19 02:27:31 2010
@@ -0,0 +1 @@
+<entry xmlns="http://www.w3.org/2005/Atom"><title
type="text">Item</title><content
type="application/xml"><item><javaClass>services.Item</javaClass><name>Orange</name><currencyCode>USD</currencyCode><currencySymbol>$</currencySymbol><price>3.55</price></item></content></entry>
Modified: tuscany/sca-cpp/trunk/samples/store-cpp/server-test
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-cpp/server-test?rev=965342&r1=965341&r2=965342&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-cpp/server-test (original)
+++ tuscany/sca-cpp/trunk/samples/store-cpp/server-test Mon Jul 19 02:27:31 2010
@@ -30,6 +30,24 @@ $curl_prefix/bin/curl http://localhost:8
diff tmp/index.html htdocs/index.html
rc=$?
+# Test Catalog
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/catalog -X
POST -H "Content-type: application/json-rpc" --data
@htdocs/test/getcatalog-request.txt >tmp/getcatalog-result.txt 2>/dev/null
+ diff tmp/getcatalog-result.txt htdocs/test/getcatalog-result.txt
+ rc=$?
+fi
+
+# Test Shopping Cart
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart
-X POST -H "Content-type: application/atom+xml" --data
@htdocs/test/shopping-cart-entry.xml 2>/dev/null
+ rc=$?
+fi
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart
>tmp/shopping-cart-feed.xml 2>/dev/null
+ grep "3.55" tmp/shopping-cart-feed.xml >/dev/null
+ rc=$?
+fi
+
# Cleanup
./stop
sleep 2
Modified: tuscany/sca-cpp/trunk/samples/store-java/server-test
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-java/server-test?rev=965342&r1=965341&r2=965342&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-java/server-test (original)
+++ tuscany/sca-cpp/trunk/samples/store-java/server-test Mon Jul 19 02:27:31
2010
@@ -30,6 +30,24 @@ $curl_prefix/bin/curl http://localhost:8
diff tmp/index.html htdocs/index.html
rc=$?
+# Test Catalog
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/catalog -X
POST -H "Content-type: application/json-rpc" --data
@../store-cpp/htdocs/test/getcatalog-request.txt >tmp/getcatalog-result.txt
2>/dev/null
+ diff tmp/getcatalog-result.txt
../store-cpp/htdocs/test/getcatalog-result.txt
+ rc=$?
+fi
+
+# Test Shopping Cart
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart
-X POST -H "Content-type: application/atom+xml" --data
@../store-cpp/htdocs/test/shopping-cart-entry.xml 2>/dev/null
+ rc=$?
+fi
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart
>tmp/shopping-cart-feed.xml 2>/dev/null
+ grep "3.55" tmp/shopping-cart-feed.xml >/dev/null
+ rc=$?
+fi
+
# Cleanup
./stop
sleep 2
Modified: tuscany/sca-cpp/trunk/samples/store-nosql/server-test
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-nosql/server-test?rev=965342&r1=965341&r2=965342&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-nosql/server-test (original)
+++ tuscany/sca-cpp/trunk/samples/store-nosql/server-test Mon Jul 19 02:27:31
2010
@@ -30,6 +30,24 @@ $curl_prefix/bin/curl http://localhost:8
diff tmp/index.html htdocs/index.html
rc=$?
+# Test Catalog
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/catalog -X
POST -H "Content-type: application/json-rpc" --data
@../store-cpp/htdocs/test/getcatalog-request.txt >tmp/getcatalog-result.txt
2>/dev/null
+ diff tmp/getcatalog-result.txt
../store-cpp/htdocs/test/getcatalog-result.txt
+ rc=$?
+fi
+
+# Test Shopping Cart
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart
-X POST -H "Content-type: application/atom+xml" --data
@../store-cpp/htdocs/test/shopping-cart-entry.xml 2>/dev/null
+ rc=$?
+fi
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart
>tmp/shopping-cart-feed.xml 2>/dev/null
+ grep "3.55" tmp/shopping-cart-feed.xml >/dev/null
+ rc=$?
+fi
+
# Cleanup
./stop
sleep 2
Modified: tuscany/sca-cpp/trunk/samples/store-python/server-test
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-python/server-test?rev=965342&r1=965341&r2=965342&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-python/server-test (original)
+++ tuscany/sca-cpp/trunk/samples/store-python/server-test Mon Jul 19 02:27:31
2010
@@ -30,6 +30,24 @@ $curl_prefix/bin/curl http://localhost:8
diff tmp/index.html htdocs/index.html
rc=$?
+# Test Catalog
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/catalog -X
POST -H "Content-type: application/json-rpc" --data
@../store-cpp/htdocs/test/getcatalog-request.txt >tmp/getcatalog-result.txt
2>/dev/null
+ diff tmp/getcatalog-result.txt
../store-cpp/htdocs/test/getcatalog-result.txt
+ rc=$?
+fi
+
+# Test Shopping Cart
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart
-X POST -H "Content-type: application/atom+xml" --data
@../store-cpp/htdocs/test/shopping-cart-entry.xml 2>/dev/null
+ rc=$?
+fi
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart
>tmp/shopping-cart-feed.xml 2>/dev/null
+ grep "3.55" tmp/shopping-cart-feed.xml >/dev/null
+ rc=$?
+fi
+
# Cleanup
./stop
sleep 2
Modified: tuscany/sca-cpp/trunk/samples/store-scheme/server-test
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-scheme/server-test?rev=965342&r1=965341&r2=965342&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-scheme/server-test (original)
+++ tuscany/sca-cpp/trunk/samples/store-scheme/server-test Mon Jul 19 02:27:31
2010
@@ -30,6 +30,24 @@ $curl_prefix/bin/curl http://localhost:8
diff tmp/index.html htdocs/index.html
rc=$?
+# Test Catalog
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/catalog -X
POST -H "Content-type: application/json-rpc" --data
@../store-cpp/htdocs/test/getcatalog-request.txt >tmp/getcatalog-result.txt
2>/dev/null
+ diff tmp/getcatalog-result.txt
../store-cpp/htdocs/test/getcatalog-result.txt
+ rc=$?
+fi
+
+# Test Shopping Cart
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart
-X POST -H "Content-type: application/atom+xml" --data
@../store-cpp/htdocs/test/shopping-cart-entry.xml 2>/dev/null
+ rc=$?
+fi
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart
>tmp/shopping-cart-feed.xml 2>/dev/null
+ grep "3.55" tmp/shopping-cart-feed.xml >/dev/null
+ rc=$?
+fi
+
# Cleanup
./stop
sleep 2
Modified: tuscany/sca-cpp/trunk/samples/store-sql/server-test
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-sql/server-test?rev=965342&r1=965341&r2=965342&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-sql/server-test (original)
+++ tuscany/sca-cpp/trunk/samples/store-sql/server-test Mon Jul 19 02:27:31 2010
@@ -30,6 +30,24 @@ $curl_prefix/bin/curl http://localhost:8
diff tmp/index.html htdocs/index.html
rc=$?
+# Test Catalog
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/catalog -X
POST -H "Content-type: application/json-rpc" --data
@../store-cpp/htdocs/test/getcatalog-request.txt >tmp/getcatalog-result.txt
2>/dev/null
+ diff tmp/getcatalog-result.txt
../store-cpp/htdocs/test/getcatalog-result.txt
+ rc=$?
+fi
+
+# Test Shopping Cart
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart
-X POST -H "Content-type: application/atom+xml" --data
@../store-cpp/htdocs/test/shopping-cart-entry.xml 2>/dev/null
+ rc=$?
+fi
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl http://localhost:8090/references/Store/shoppingCart
>tmp/shopping-cart-feed.xml 2>/dev/null
+ grep "3.55" tmp/shopping-cart-feed.xml >/dev/null
+ rc=$?
+fi
+
# Cleanup
./stop
sleep 2
Modified: tuscany/sca-cpp/trunk/samples/store-vhost/server-test
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/samples/store-vhost/server-test?rev=965342&r1=965341&r2=965342&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/samples/store-vhost/server-test (original)
+++ tuscany/sca-cpp/trunk/samples/store-vhost/server-test Mon Jul 19 02:27:31
2010
@@ -26,13 +26,31 @@ curl_prefix=`cat $here/../../modules/htt
sleep 2
# For this test to work, add the test domain to your etc/hosts as follows:
-# 127.0.0.1 sca-store.com jane.sca-store.com joe.sca-store.com
+# 127.0.0.1 sca-store.com joe.sca-store.com joe.sca-store.com
# Test HTTP GET
-$curl_prefix/bin/curl http://jane.sca-store.com:8090/ 2>/dev/null
>tmp/jane.html
-diff tmp/jane.html htdocs/domains/jane/index.html
+$curl_prefix/bin/curl http://joe.sca-store.com:8090/ 2>/dev/null
>tmp/index.html
+diff tmp/index.html htdocs/domains/joe/index.html
rc=$?
+# Test Catalog
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl
http://joe.sca-store.com:8090/references/Store/catalog -X POST -H
"Content-type: application/json-rpc" --data
@../store-cpp/htdocs/test/getcatalog-request.txt >tmp/getcatalog-result.txt
2>/dev/null
+ diff tmp/getcatalog-result.txt
../store-cpp/htdocs/test/getcatalog-result.txt
+ rc=$?
+fi
+
+# Test Shopping Cart
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl
http://joe.sca-store.com:8090/references/Store/shoppingCart -X POST -H
"Content-type: application/atom+xml" --data
@../store-cpp/htdocs/test/shopping-cart-entry.xml 2>/dev/null
+ rc=$?
+fi
+if [ "$rc" = "0" ]; then
+ $curl_prefix/bin/curl
http://joe.sca-store.com:8090/references/Store/shoppingCart
>tmp/shopping-cart-feed.xml 2>/dev/null
+ grep "3.55" tmp/shopping-cart-feed.xml >/dev/null
+ rc=$?
+fi
+
# Cleanup
./stop
sleep 2