Files
mongo/db/repl/testing.js

21 lines
442 B
JavaScript
Raw Normal View History

2010-05-05 14:00:25 -04:00
// helpers for testing repl sets
2010-05-05 16:33:35 -04:00
// run
2010-05-13 17:18:17 -04:00
// mongo --shell <host:port> testing.js
2010-05-05 14:00:25 -04:00
cfg = {
_id: 'asdf',
members: [
{ _id : 0, host : "dm_hp" },
{ _id : 2, host : "dm_hp:27002" }
]
};
db = db.getSisterDB("admin");
local = db.getSisterDB("local");
2010-05-13 17:18:17 -04:00
print("\nswitched to admin db");
print("cfg = samp replset config");
print("rc = runCommand\n");
2010-05-05 14:00:25 -04:00
function rc(c) { return db.runCommand(c); }