aboutsummaryrefslogtreecommitdiffstats
path: root/coverage/scripts/01-http.sh
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2018-07-12 10:59:48 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-07-24 16:28:32 +0200
commite17ae412245ba9afb33ff6a0f1f665b4d66d4da4 (patch)
tree698628c58b541007033ede6b4343dae921214da6 /coverage/scripts/01-http.sh
parent4c0f6ce66c66d39dc61ec661d88277c51d2fd9ae (diff)
coverage and test: Add tests
coverage values: - lines: 70.5 % - functions: 76.3 % Change-Id: Iaf802e84bbfa57502bbbac8c3b567b14c01608b6 Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'coverage/scripts/01-http.sh')
-rwxr-xr-xcoverage/scripts/01-http.sh28
1 files changed, 20 insertions, 8 deletions
diff --git a/coverage/scripts/01-http.sh b/coverage/scripts/01-http.sh
index 191318c0..9ffd640f 100755
--- a/coverage/scripts/01-http.sh
+++ b/coverage/scripts/01-http.sh
@@ -1,17 +1,29 @@
#!/bin/sh
-curl $URL/index.html
-curl $URL/marrus-orthocanna.jpg
-curl $URL/test.js
-curl $URL/icons/marrus-orthocanna.jpg
+curl -s -o /dev/null $URL/index.html
+curl -s -o /dev/null $URL/marrus-orthocanna.jpg
+curl -s -o /dev/null $URL/test.js
+curl -s -o /dev/null $URL/icons/marrus-orthocanna.jpg
-curl $URL/fake-file.html
+curl -s -o /dev/null $URL/fake-file.html
-curl "$URL/api/salut/ping?arg1=null&arg1=%22a+string%22"
-curl "$URL/api/hello/ping" \
+curl -s "$URL/api/salut/ping?arg1=null&arg1=%22a+string%22"
+curl -s "$URL/api/hello/ping" \
-F image=@$R/www/marrus-orthocanna.jpg \
-F name=test
-curl -X POST "$URL/api/hello/ping" \
+curl -s -X POST "$URL/api/hello/ping" \
--header 'content-type: application/json' \
--data-binary '[null,3,{"hello":false,"salut":4.5},true]'
+
+curl -s "$URL/api/hello/get?name=something&something=nothing"
+
+curl -s -F name=file -F file=@$R/www/marrus-orthocanna.jpg "$URL/api/hello/get"
+
+curl -s -X HEAD -o /dev/null $URL/index.html
+#curl -s -X CONNECT -o /dev/null $URL/index.html
+curl -s -X DELETE -o /dev/null $URL/index.html
+curl -s -X OPTIONS -o /dev/null $URL/index.html
+curl -s -X PATCH -o /dev/null $URL/index.html
+curl -s -X PUT -o /dev/null $URL/index.html
+curl -s -X TRACE -o /dev/null $URL/index.html