diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-11-25 11:20:43 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-12-08 13:05:00 -0500 |
commit | 3ed6635a5fb26c354046d275a1217c4526b2fe02 (patch) | |
tree | f40aa20b5e62996843ce3df0f47b82042dd683a7 /jstests/sslSpecial | |
parent | 4f24dc58f48cb087db8a4832421d298e9e2633a0 (diff) | |
download | mongo-3ed6635a5fb26c354046d275a1217c4526b2fe02.tar.gz |
SERVER-21050 Cleanup ReplSetTest
This is just a cleanup work to hide some of the private state of
ReplSetTest so it is easier to encapsulate and add new logic. Also enables
strict mode.
Diffstat (limited to 'jstests/sslSpecial')
-rw-r--r-- | jstests/sslSpecial/upgrade_to_ssl_nossl.js | 6 | ||||
-rw-r--r-- | jstests/sslSpecial/upgrade_to_x509_ssl_nossl.js | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/jstests/sslSpecial/upgrade_to_ssl_nossl.js b/jstests/sslSpecial/upgrade_to_ssl_nossl.js index 1f5f0002d4e..53f7bd77fb9 100644 --- a/jstests/sslSpecial/upgrade_to_ssl_nossl.js +++ b/jstests/sslSpecial/upgrade_to_ssl_nossl.js @@ -13,19 +13,19 @@ var rst = new ReplSetTest({ name: 'sslSet', nodes: 3, nodeOptions : {sslMode:"di rst.startSet(); rst.initiate(); -var rstConn1 = rst.getMaster(); +var rstConn1 = rst.getPrimary(); rstConn1.getDB("test").a.insert({a:1, str:"TESTTESTTEST"}); assert.eq(1, rstConn1.getDB("test").a.count(), "Error interacting with replSet"); print("===== UPGRADE disabled -> allowSSL ====="); rst.upgradeSet({sslMode:"allowSSL", sslPEMKeyFile: SERVER_CERT, sslAllowInvalidCertificates:""}); -var rstConn2 = rst.getMaster(); +var rstConn2 = rst.getPrimary(); rstConn2.getDB("test").a.insert({a:2, str:"TESTTESTTEST"}); assert.eq(2, rstConn2.getDB("test").a.count(), "Error interacting with replSet"); print("===== UPGRADE allowSSL -> preferSSL ====="); rst.upgradeSet({sslMode:"preferSSL", sslPEMKeyFile: SERVER_CERT, sslAllowInvalidCertificates:""}); -var rstConn3 = rst.getMaster(); +var rstConn3 = rst.getPrimary(); rstConn3.getDB("test").a.insert({a:3, str:"TESTTESTTEST"}); assert.eq(3, rstConn3.getDB("test").a.count(), "Error interacting with replSet"); diff --git a/jstests/sslSpecial/upgrade_to_x509_ssl_nossl.js b/jstests/sslSpecial/upgrade_to_x509_ssl_nossl.js index 72bcc9fc76d..74aae02a896 100644 --- a/jstests/sslSpecial/upgrade_to_x509_ssl_nossl.js +++ b/jstests/sslSpecial/upgrade_to_x509_ssl_nossl.js @@ -23,7 +23,7 @@ rst.startSet(); rst.initiate(); // Connect to master and do some basic operations -var rstConn1 = rst.getMaster(); +var rstConn1 = rst.getPrimary(); rstConn1.getDB("admin").createUser({user: "root", pwd: "pwd", roles: ["root"]}, {w: NUM_NODES}); rstConn1.getDB("admin").auth("root", "pwd"); rstConn1.getDB("test").a.insert({a:1, str:"TESTTESTTEST"}); @@ -38,7 +38,7 @@ rst.upgradeSet({sslMode:"allowSSL", sslPEMKeyFile: SERVER_CERT, authAllNodes(); rst.awaitReplication(); -var rstConn2 = rst.getMaster(); +var rstConn2 = rst.getPrimary(); rstConn2.getDB("test").a.insert({a:2, str:"CHECKCHECKCHECK"}); assert.eq(2, rstConn2.getDB("test").a.count(), "Error interacting with replSet"); @@ -50,7 +50,7 @@ rst.upgradeSet({sslMode:"preferSSL", sslPEMKeyFile: SERVER_CERT, authAllNodes(); rst.awaitReplication(); -var rstConn3 = rst.getMaster(); +var rstConn3 = rst.getPrimary(); rstConn3.getDB("test").a.insert({a:3, str:"PEASandCARROTS"}); assert.eq(3, rstConn3.getDB("test").a.count(), "Error interacting with replSet"); @@ -67,7 +67,7 @@ rst.upgradeSet({sslMode:"preferSSL", sslPEMKeyFile: SERVER_CERT, sslCAFile: CA_CERT}, "root", "pwd"); authAllNodes(); rst.awaitReplication(); -var rstConn4 = rst.getMaster(); +var rstConn4 = rst.getPrimary(); rstConn4.getDB("test").a.insert({a:4, str:"BEEP BOOP"}); rst.awaitReplication(); assert.eq(4, rstConn4.getDB("test").a.count(), "Error interacting with replSet"); |