0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-16863 make auth_no_pri.js election-agnostic

This commit is contained in:
Eric Milkie 2015-01-15 08:57:37 -05:00
parent da73922df6
commit 37732258be

View File

@ -2,7 +2,7 @@
(function () {
var NODE_COUNT = 3;
var rs = new ReplSetTest({"nodes" : NODE_COUNT, keyFile : "jstests/libs/key1"});
rs.startSet();
var nodes = rs.startSet();
rs.initiate();
// Add user
@ -17,7 +17,7 @@ assert.writeOK(conn.getDB('admin').foo.insert({a:1}, { writeConcern: { w: NODE_C
// Make sure there is no primary
rs.stop(0);
rs.stop(1);
assert.throws(function() {rs.getMaster()}); // Should no longer be any primary
rs.waitForState(nodes[2], rs.SECONDARY);
// Make sure you can still authenticate a replset connection with no primary
var conn2 = new Mongo(rs.getURL());