mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
Support a "no_server" flag in test config.
* Will use a running instance of rippled (possibly in a debugger). * Modify all tests to respect the server_default value. * Fail test if new account already exists and has a balance. * README.md with instructions for advanced test debugging, particularly using no_server.
This commit is contained in:
committed by
Nik Bougalis
parent
7f5f73887d
commit
a5df3f1747
@@ -11,11 +11,12 @@ suite('WebSocket connection', function() {
|
||||
setup(function(done) {
|
||||
this.timeout(2000);
|
||||
|
||||
var cfg = extend({}, config.default_server_config, config.servers.alpha);
|
||||
var host = config.server_default;
|
||||
var cfg = testutils.get_server_config(config, host);
|
||||
if (cfg.no_server) {
|
||||
done();
|
||||
} else {
|
||||
server = Server.from_config("alpha", cfg);
|
||||
server = Server.from_config(host, cfg);
|
||||
server.once('started', done)
|
||||
server.start();
|
||||
}
|
||||
@@ -24,7 +25,8 @@ suite('WebSocket connection', function() {
|
||||
teardown(function(done) {
|
||||
this.timeout(2000);
|
||||
|
||||
if (config.servers.alpha.no_server) {
|
||||
var cfg = testutils.get_server_config(config);
|
||||
if (cfg.no_server) {
|
||||
done();
|
||||
} else {
|
||||
server.on('stopped', done);
|
||||
@@ -39,7 +41,8 @@ suite('WebSocket connection', function() {
|
||||
// push the measured time out this far.
|
||||
this.timeout(3000);
|
||||
|
||||
var alpha = Remote.from_config("alpha");
|
||||
var host = config.server_default;
|
||||
var alpha = Remote.from_config(host);
|
||||
|
||||
alpha.on('connected', function () {
|
||||
alpha.on('disconnected', function () {
|
||||
|
||||
Reference in New Issue
Block a user