diff --git a/src/function-run/nodejs/test/test.js b/src/function-run/nodejs/test/test.js index fc8fca57..288ef627 100644 --- a/src/function-run/nodejs/test/test.js +++ b/src/function-run/nodejs/test/test.js @@ -1,4 +1,5 @@ module.exports = function (context, callback) { - console.log("Test function"); - callback(200, "Hello, world!"); + console.log("Test function entered"); + callback(200, "Hello, world!\n"); + console.log("Test function exit"); } diff --git a/src/function-run/nodejs/test/test.sh b/src/function-run/nodejs/test/test.sh index e8ab274b..49907e64 100755 --- a/src/function-run/nodejs/test/test.sh +++ b/src/function-run/nodejs/test/test.sh @@ -3,7 +3,7 @@ # TODO placeholder until we have better tests :) set +x -set -e +set -e DIR=$(dirname $0) @@ -17,7 +17,15 @@ trap cleanup EXIT sleep 2 echo "-- Specializing" -curl -f -X POST http://localhost:8888/specialize +curl -f -X POST http://localhost:8888/specialize 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