A very rudimentary test script

We should have real tests with mocha/chai etc. Until then, use this
little bash script.
This commit is contained in:
Soam Vasani
2016-08-24 11:56:49 -07:00
parent ef04ff83cb
commit 076b57c50a
2 changed files with 26 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
exports = function (context, callback) {
console.log("Test function");
callback(200, "Hello, world!");
}
+22
View File
@@ -0,0 +1,22 @@
#!/bin/sh
# TODO placeholder until we have better tests :)
set +x
set -e
DIR=$(dirname $0)
echo "-- Starting server"
node $DIR/../server.js --codepath $DIR/test.js --port 8888 &
sleep 2
echo "-- Specializing"
curl -f -X POST http://localhost:8888/specialize
echo "-- Running user function"
curl -f http://localhost:8888 ; echo
echo "-- Cleanup"
kill %1