Commit 195d4c6c authored by Andrew Newdigate's avatar Andrew Newdigate

WIP run tests in isolation inside a containerised environment

parent 6b2c3797
test:
build: .
links:
- mongo1
- mongo2
- mongo3
- redis1
- redis2
- sentinel1
- elasticsearch
- neo4j
environment:
DEBUG: "gitter:*"
entrypoint: [ "/bin/bash", "-c", "cd /src; ./node_modules/.bin/gulp test-docker"]
......@@ -30,7 +30,7 @@ var lcovMerger = require ('lcov-result-merger');
/* Don't do clean in gulp, use make */
var DEV_MODE = !!process.env.DEV_MODE;
var RUN_TESTS_IN_PARALLEL = true;
var RUN_TESTS_IN_PARALLEL = false;
var SPAWN_WEBPACK = true;
var testModules = {
......@@ -141,6 +141,28 @@ makeTestTasks('test-mocha', function(name, files) {
}));
});
makeTestTasks('test-docker', function(name, files) {
mkdirp.sync('output/test-reports/');
mkdirp.sync('output/coverage-reports/' + name);
return gulp.src(files, { read: false })
.pipe(mocha({
reporter: 'xunit-file',
timeout: 10000,
istanbul: {
dir: 'output/coverage-reports/' + name
},
env: {
TAP_FILE: 'output/test-reports/' + name + '.tap',
XUNIT_FILE: 'output/test-reports/' + name + '.xml',
NODE_ENV: 'test-docker',
DEBUG: 'gitter:*',
Q_DEBUG: 1,
BLUEBIRD_DEBUG: 1
}
}));
});
gulp.task('test-redis-lua', shell.task([
'./test/redis-lua/run-tests'
]));
......
......@@ -232,7 +232,7 @@
"through2": "^0.6.3",
"webpack": "^1.9.5",
"webpack-dev-middleware": "^1.0.11",
"xunit-file": "0.0.6",
"xunit-file": "0.0.9",
"zip-stream": "^0.5.1"
},
"engines": {
......
{
"consoleOutput" : {
"suite" : true,
"test" : true,
"fail" : true
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment