Skip to content
This repository has been archived by the owner on Jan 7, 2018. It is now read-only.

Commit

Permalink
Make sure tests run from the current router dir due to 00d849
Browse files Browse the repository at this point in the history
This ensures that the local tests always run from the local directory,
despite the default config values now using a hard-coded path of
/opt/api-umbrella/embedded/apps/router/current
  • Loading branch information
GUI committed Jan 26, 2015
1 parent 00d849d commit a8424cf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 9 additions & 1 deletion test/support/env.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
'use strict';

var path = require('path');
var fs = require('fs'),
path = require('path'),
yaml = require('js-yaml');

fs.writeFileSync('/tmp/api-umbrella-test.yml', yaml.safeDump({
router: {
dir: path.resolve(__dirname, '../../'),
},
}));

process.env.NODE_ENV = 'test';
process.env.API_UMBRELLA_LOG_LEVEL = 'debug';
Expand Down
5 changes: 4 additions & 1 deletion test/support/start_processes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ before(function startProcesses(done) {
this.timeout(180000);

var options = {
config: [path.resolve(__dirname, '../config/test.yml')],
config: [
path.resolve(__dirname, '../config/test.yml'),
'/tmp/api-umbrella-test.yml',
],
};

this.router = router.run(options, done);
Expand Down

0 comments on commit a8424cf

Please sign in to comment.