test: merge environment, don't overwrite

The CI system requires that some environment variables are set so merge
our variables into the current environment instead of blindly replacing
it.

This will probably have to be repeated for other tests. C'est la vie.
pull/24507/merge
Ben Noordhuis 2013-02-26 19:38:15 +01:00
parent cfacde3ac6
commit e505f91266
1 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@
var common = require('../common');
var assert = require('assert');
var http = require('http');
var util = require('util');
var fork = require('child_process').fork;
if (process.env.NODE_TEST_FORK) {
@ -45,7 +46,7 @@ else {
});
server.listen(common.PORT, function() {
fork(__filename, {
env: {NODE_TEST_FORK: '1'}
env: util._extend(process.env, {NODE_TEST_FORK: '1'})
});
});
}