mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Added test for config with spaces
This commit is contained in:
committed by
Jose Diaz-Gonzalez
parent
5dbc864060
commit
361011ec69
@@ -1,3 +1,15 @@
|
||||
#!/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"
|
||||
}
|
||||
@@ -4,5 +4,5 @@ set -ex;
|
||||
REMOTE=$1
|
||||
REPO=$2
|
||||
|
||||
ssh $REMOTE config:set $REPO CONFTEST=config-test
|
||||
ssh $REMOTE config:set $REPO CONFTEST=config-test HELLO="Hello world"
|
||||
|
||||
|
||||
@@ -6,6 +6,10 @@ app.get('/', function(request, response) {
|
||||
response.send(process.env.CONFTEST);
|
||||
});
|
||||
|
||||
app.get('/hello', function(request, response) {
|
||||
response.send(process.env.HELLO);
|
||||
});
|
||||
|
||||
var port = process.env.PORT || 5000;
|
||||
app.listen(port, function() {
|
||||
console.log("Listening on " + port);
|
||||
|
||||
Reference in New Issue
Block a user