Add a config test.

This commit is contained in:
Paul Lietar
2013-12-11 21:41:16 +00:00
parent baefdabdfc
commit 48b4e330a3
5 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1 @@
web: node web.js

3
tests/apps/config/check_deploy Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
set -e; output="$(curl -s $1)"; echo $output; test "$output" == "config-test"

View File

@@ -0,0 +1,11 @@
{
"name": "node-example",
"version": "0.0.1",
"dependencies": {
"express": "2.5.x"
},
"engines": {
"node": "0.8.x",
"npm": "1.1.x"
}
}

8
tests/apps/config/post-deploy Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
set -ex;
REMOTE=$1
REPO=$2
ssh $REMOTE config:set $REPO CONFTEST=config-test

12
tests/apps/config/web.js Normal file
View File

@@ -0,0 +1,12 @@
var express = require('express');
var app = express.createServer(express.logger());
app.get('/', function(request, response) {
response.send(process.env.CONFTEST);
});
var port = process.env.PORT || 5000;
app.listen(port, function() {
console.log("Listening on " + port);
});