summaryrefslogtreecommitdiff
path: root/jstests/replsets
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2011-04-07 07:35:46 +0200
committerAntonin Kral <a.kral@bobek.cz>2011-04-07 07:35:46 +0200
commit8d913e98e8058c6322975a858f884a769735bb43 (patch)
tree52da0129272024f7132594b8227d81ec72f83af1 /jstests/replsets
parent582fc32574a3b158c81e49cb00e6ae59205e66ba (diff)
downloadmongodb-8d913e98e8058c6322975a858f884a769735bb43.tar.gz
Imported Upstream version 1.8.1
Diffstat (limited to 'jstests/replsets')
-rw-r--r--jstests/replsets/replset5.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/jstests/replsets/replset5.js b/jstests/replsets/replset5.js
index 13ee5c9..6a7d8a5 100644
--- a/jstests/replsets/replset5.js
+++ b/jstests/replsets/replset5.js
@@ -49,6 +49,23 @@ doTest = function (signal) {
var master1count = master.getDB(testDB).foo.count();
assert( master1count == docNum, "Master has " + master1count + " of " + docNum + " documents!");
+ print("reconfigure with hidden=1");
+ config = master.getDB("local").system.replset.findOne();
+ config.version++;
+ config.members[2].priority = 0;
+ config.members[2].hidden = 1;
+
+ try {
+ master.adminCommand({replSetReconfig : config});
+ }
+ catch(e) {
+ print(e);
+ }
+
+ config = master.getDB("local").system.replset.findOne();
+ printjson(config);
+ assert.eq(config.members[2].hidden, true);
+
replTest.stopSet(signal);
}