forked from llnl/tox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunitTest
More file actions
executable file
·32 lines (32 loc) · 3.24 KB
/
unitTest
File metadata and controls
executable file
·32 lines (32 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
echo -- no parameters -----------------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\n" "http://localhost:8080/tox/example.test.alive" > test1.html
echo -- 1 parameter -------------------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\n" "http://localhost:8080/tox/example.test.formatted?in_mask=YYYYMMDD" > test2.html
echo -- 3 parameters ------------------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\n" "http://localhost:8080/tox/example.test.formatted?in_maskIn=mm/dd/yyyy&in_date=07/17/1961&in_maskOut=YYYYMMDD" > test3.html
echo -- 1 parameter, XML output -------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\n" "http://localhost:8080/tox/example.test.formatted?in_mask=YYYYMMDD&outputFormat=XML" > test4.html
echo -- 1 parameter, XML output, XSL transform ----
curl -X GET -w "\n\nstatus code => %{http_code}\n\n" "http://localhost:8080/tox/example.test.formatted?in_mask=YYYYMMDD&outputFormat=XML&outputXform=src/xslt/test.xsl" > test5.html
echo -- 1 parameter, XSL transform ----------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\n" "http://localhost:8080/tox/example.test.formatted?in_mask=YYYYMMDD&outputXform=src/xslt/test.xsl" > test6.html
echo -- 1 parameter, JSON output ------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\n" "http://localhost:8080/tox/example.test.formatted?in_mask=YYYYMMDD&outputFormat=JSON" > test7.html
echo -- 1 parameter, JSON output ------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\n" "http://localhost:8080/tox/example.test.formatted?in_mask=YYYYMMDD&outputFormat=JSON&outputXform=src/xslt/test.xsl" > test8.html
echo -- no parameters, POST payload ---------------
curl -X POST -d '<root><date yyyymmdd="19690720"/></root>' -w "\n\nstatus code => %{http_code}\n\n" "http://localhost:8080/tox/example.test.echo" > test9.html
echo -- no parameters, POST payload, JSON output --
curl -X POST -d '<root><date yyyymmdd="19690720"/></root>' -w "\n\nstatus code => %{http_code}\n\n" "http://localhost:8080/tox/example.test.echo?outputFormat=JSON" > test10.html
echo -- no parameters, POST payload, JSON input --
curl -X POST -d '{"root":{"date":{"yyyymmdd":19690720}}}' -w "\n\nstatus code => %{http_code}\n\n" "http://localhost:8080/tox/example.test.echo?inputFormat=JSON&inputXform=src/xslt/attr.xsl" > test11.html
echo -- no parameters, POST payload, JSON input, JSON output --
curl -X POST -d '{"root":{"date":{"yyyymmdd":19690720}}}' -w "\n\nstatus code => %{http_code}\n\n" "http://localhost:8080/tox/example.test.echo?outputFormat=JSON&inputFormat=JSON&inputXform=src/xslt/attr.xsl" > test12.html
echo -- 1 parameter, XML output, XSL transform with parameters --
curl -X GET -w "\n\nstatus code => %{http_code}\n\n" "http://localhost:8080/tox/example.test.formatted?in_mask=YYYYMMDD&outputXform=src/xslt/test.xsl(title=parameters,host=nowhere.org)" > test13.html
echo -- not implemented, expect error -------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\n" "http://localhost:8080/tox/example.test.pineapple" > test14.html
echo -- no pl/sql, expect error -------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\n" "http://localhost:8080/tox/" > test15.html
echo -----------------------------------------------