mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-20 10:35:50 +00:00
UT: Set the cwd for the servers.
This commit is contained in:
@@ -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 = {
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user