mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
UT: Get WS ledger_current test working.
This commit is contained in:
@@ -12,7 +12,6 @@ var serverDelay = 1500;
|
|||||||
|
|
||||||
buster.testRunner.timeout = 5000;
|
buster.testRunner.timeout = 5000;
|
||||||
|
|
||||||
|
|
||||||
buster.testCase("Standalone server startup", {
|
buster.testCase("Standalone server startup", {
|
||||||
"server start and stop": function(done) {
|
"server start and stop": function(done) {
|
||||||
server.start("alpha",
|
server.start("alpha",
|
||||||
@@ -56,44 +55,52 @@ buster.testCase("WebSocket connection", {
|
|||||||
buster.assert(3 == stat); // CLOSED
|
buster.assert(3 == stat); // CLOSED
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
}, undefined, serverDelay);
|
}, serverDelay);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// var alpha = remote.remoteConfig("alpha");
|
// XXX Figure out a way to stuff this into the test case.
|
||||||
//
|
var alpha;
|
||||||
// buster.testCase("Websocket commands", {
|
|
||||||
// 'setUp' :
|
buster.testCase("Websocket commands", {
|
||||||
// function(done) {
|
'setUp' :
|
||||||
// server.start("alpha",
|
function(done) {
|
||||||
// function(e) {
|
server.start("alpha",
|
||||||
// buster.refute(e);
|
function(e) {
|
||||||
//
|
buster.refute(e);
|
||||||
// alpha.connect(function(stat) {
|
|
||||||
// buster.assert(1 == stat); // OPEN
|
alpha = remote.remoteConfig(config, "alpha");
|
||||||
//
|
|
||||||
// done();
|
alpha.connect(function(stat) {
|
||||||
// });
|
buster.assert(1 == stat); // OPEN
|
||||||
// });
|
|
||||||
// },
|
done();
|
||||||
//
|
}, serverDelay);
|
||||||
// 'tearDown' :
|
});
|
||||||
// function(done) {
|
},
|
||||||
// alpha.disconnect(function(stat) {
|
|
||||||
// buster.assert(3 == stat); // CLOSED
|
'tearDown' :
|
||||||
//
|
function(done) {
|
||||||
// server.stop("alpha", function(e) {
|
alpha.disconnect(function(stat) {
|
||||||
// buster.refute(e);
|
buster.assert(3 == stat); // CLOSED
|
||||||
//
|
|
||||||
// done();
|
server.stop("alpha", function(e) {
|
||||||
// });
|
buster.refute(e);
|
||||||
// });
|
|
||||||
// },
|
done();
|
||||||
//
|
});
|
||||||
// "assert" :
|
});
|
||||||
// function() {
|
},
|
||||||
// buster.assert(true);
|
|
||||||
// }
|
"ledger_current" :
|
||||||
// });
|
function(done) {
|
||||||
|
alpha.ledger_current(function (r) {
|
||||||
|
console.log(r);
|
||||||
|
|
||||||
|
buster.assert(r.ledger === 2);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// vim:ts=4
|
// vim:ts=4
|
||||||
|
|||||||
Reference in New Issue
Block a user