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:
@@ -9,15 +9,17 @@ exports.newcoind = path.join(process.cwd(), "newcoind");
|
||||
|
||||
// Configuration for servers.
|
||||
exports.servers = {
|
||||
// A local test server.
|
||||
alpha : {
|
||||
'trusted' : true,
|
||||
// "peer_ip" : "0.0.0.0",
|
||||
// "peer_port" : 51235,
|
||||
"rpc_ip" : "0.0.0.0",
|
||||
"rpc_port" : 5005,
|
||||
"websocket_ip" : "127.0.0.1",
|
||||
"websocket_port" : 6005,
|
||||
"validation_seed" : "shhDFVsmS2GSu5vUyZSPXYfj1r79h",
|
||||
"validators" : "n9L8LZZCwsdXzKUN9zoVxs4YznYXZ9hEhsQZY7aVpxtFaSceiyDZ beta"
|
||||
'rpc_ip' : "0.0.0.0",
|
||||
'rpc_port' : 5005,
|
||||
'websocket_ip' : "127.0.0.1",
|
||||
'websocket_port' : 6005,
|
||||
'validation_seed' : "shhDFVsmS2GSu5vUyZSPXYfj1r79h",
|
||||
'validators' : "n9L8LZZCwsdXzKUN9zoVxs4YznYXZ9hEhsQZY7aVpxtFaSceiyDZ beta"
|
||||
}
|
||||
};
|
||||
// vim:ts=4
|
||||
|
||||
@@ -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