UT: Set the cwd for the servers.

This commit is contained in:
Arthur Britto
2012-09-17 15:45:44 -07:00
parent b6771dcae9
commit 333da36c19
2 changed files with 7 additions and 5 deletions

View File

@@ -2,8 +2,10 @@
// Configuration for unit tests // Configuration for unit tests
// //
var path = require("path");
// Where to find the binary. // Where to find the binary.
exports.newcoind = "./newcoind"; exports.newcoind = path.join(process.cwd(), "newcoind");
// Configuration for servers. // Configuration for servers.
exports.servers = { exports.servers = {

View File

@@ -30,7 +30,6 @@ var configContent = function(name) {
var configPath = function(name) { var configPath = function(name) {
return path.join(serverPath(name), "newcoind.cfg"); return path.join(serverPath(name), "newcoind.cfg");
}; };
// Write a server's newcoind.cfg. // Write a server's newcoind.cfg.
@@ -44,11 +43,12 @@ var serverSpawnSync = function(name) {
config.newcoind, config.newcoind,
[ [
"-a", "-a",
"--conf=" + configPath(name) "--conf=newcoind.cfg"
], ],
{ {
env : process.env, cwd: serverPath(name),
stdio : 'inherit' env: process.env,
stdio: 'inherit'
}); });
servers[name] = server; servers[name] = server;