mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
UT: Initial tests of creating and connecting to a standalone store.
This commit is contained in:
@@ -4,6 +4,7 @@ var fs = require("fs");
|
||||
var buster = require("buster");
|
||||
|
||||
var server = require("./server.js");
|
||||
var remote = require("../js/remote.js");
|
||||
|
||||
buster.testCase("Check standalone server startup", {
|
||||
"server start and stop": function(done) {
|
||||
@@ -18,4 +19,44 @@ buster.testCase("Check standalone server startup", {
|
||||
}
|
||||
});
|
||||
|
||||
buster.testCase("Check websocket connection", {
|
||||
'setUp' :
|
||||
function(done) {
|
||||
server.start("alpha",
|
||||
function(e) {
|
||||
buster.refute(e);
|
||||
done();
|
||||
});
|
||||
},
|
||||
|
||||
'tearDown' :
|
||||
function(done) {
|
||||
server.stop("alpha", function(e) {
|
||||
buster.refute(e);
|
||||
done();
|
||||
});
|
||||
},
|
||||
|
||||
"websocket connect and disconnect" :
|
||||
function(done) {
|
||||
var alpha = remote.remoteConfig("alpha");
|
||||
|
||||
alpha.connect(function(stat) {
|
||||
buster.assert(1 == stat); // OPEN
|
||||
|
||||
alpha.disconnect(function(stat) {
|
||||
buster.assert(3 == stat); // CLOSED
|
||||
done();
|
||||
});
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
buster.testCase("Check assert", {
|
||||
"assert" :
|
||||
function() {
|
||||
buster.assert(true);
|
||||
}
|
||||
});
|
||||
|
||||
// vim:ts=4
|
||||
|
||||
Reference in New Issue
Block a user