diff options
author | Eric Milkie <milkie@10gen.com> | 2015-01-16 14:04:58 -0500 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2015-01-20 14:08:32 -0500 |
commit | 13de9e9c9f755de978df00bc8fd82bd9b526a67e (patch) | |
tree | dae4bc40605d237be80cbc342f70712853bf59c2 /jstests/replsets/auth1.js | |
parent | da1c93cc9fa8ac14e57335c46c0bad52d74a2981 (diff) | |
download | mongo-13de9e9c9f755de978df00bc8fd82bd9b526a67e.tar.gz |
SERVER-16904 re-auth the master if it happens not to be node 0
Diffstat (limited to 'jstests/replsets/auth1.js')
-rw-r--r-- | jstests/replsets/auth1.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/replsets/auth1.js b/jstests/replsets/auth1.js index 63368468b3b..0b004b57318 100644 --- a/jstests/replsets/auth1.js +++ b/jstests/replsets/auth1.js @@ -60,8 +60,8 @@ var master = rs.getMaster(); rs.awaitSecondaryNodes(); var mId = rs.getNodeId(master); var slave = rs.liveNodes.slaves[0]; - -master.getDB("test").foo.insert({ x: 1 }, { writeConcern: { w:3, wtimeout:60000 }}); +assert.eq(1, master.getDB("admin").auth("foo", "bar")); +assert.writeOK(master.getDB("test").foo.insert({ x: 1 }, { writeConcern: { w:3, wtimeout:60000 }})); print("try some legal and illegal reads"); var r = master.getDB("test").foo.findOne(); |