Test other http verbs: get, put, post, delete, options, trace, head.

This commit is contained in:
Soam Vasani
2016-08-24 13:49:45 -07:00
parent 0ea5e2b05e
commit 12f6a93352
2 changed files with 14 additions and 5 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
module.exports = function (context, callback) { module.exports = function (context, callback) {
console.log("Test function"); console.log("Test function entered");
callback(200, "Hello, world!"); callback(200, "Hello, world!\n");
console.log("Test function exit");
} }
+11 -3
View File
@@ -3,7 +3,7 @@
# TODO placeholder until we have better tests :) # TODO placeholder until we have better tests :)
set +x set +x
set -e set -e
DIR=$(dirname $0) DIR=$(dirname $0)
@@ -17,7 +17,15 @@ trap cleanup EXIT
sleep 2 sleep 2
echo "-- Specializing" echo "-- Specializing"
curl -f -X POST http://localhost:8888/specialize curl -f -X POST http://localhost:8888/specialize
echo "-- Running user function" echo "-- Running user function"
curl -f http://localhost:8888 ; echo curl -f -X GET http://localhost:8888
curl -f -X POST http://localhost:8888
curl -f -X PUT http://localhost:8888
curl -f -X DELETE http://localhost:8888
curl -f -X TRACE http://localhost:8888
curl -f -X OPTIONS http://localhost:8888
# -I causes curl to make a HEAD request.
curl -f -I http://localhost:8888