Added test for config with spaces

This commit is contained in:
Ludovic Perrine authored and Jose Diaz-Gonzalez committed 2014-11-15 22:03:54 -05:00
1 parent 5dbc864060
commit 361011ec69
3 files changed
+18 -2

No files matched your search

+13 -1
View File
@@ -1,3 +1,15 @@
#!/bin/bash #!/bin/bash
set -e; output="$(curl -s $1)"; echo $output; test "$output" == "config-test" set -e;
base_url="$1"
test_url / "config-test"
test_url /hello "Hello world"
test_url () {
path="$1"
expected_output="$2"
url="$base_url$path"
output="$(curl -s $url)"
echo $output
test "$output" == "$expected_output"
}
+1 -1
View File
@@ -4,5 +4,5 @@ set -ex;
REMOTE=$1 REMOTE=$1
REPO=$2 REPO=$2
ssh $REMOTE config:set $REPO CONFTEST=config-test ssh $REMOTE config:set $REPO CONFTEST=config-test HELLO="Hello world"
+4
View File
@@ -6,6 +6,10 @@ app.get('/', function(request, response) {
response.send(process.env.CONFTEST); response.send(process.env.CONFTEST);
}); });
app.get('/hello', function(request, response) {
response.send(process.env.HELLO);
});
var port = process.env.PORT || 5000; var port = process.env.PORT || 5000;
app.listen(port, function() { app.listen(port, function() {
console.log("Listening on " + port); console.log("Listening on " + port);