summaryrefslogtreecommitdiff
path: root/jstests/ssl/initial_sync1_x509.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/ssl/initial_sync1_x509.js')
-rw-r--r--jstests/ssl/initial_sync1_x509.js22
1 files changed, 18 insertions, 4 deletions
diff --git a/jstests/ssl/initial_sync1_x509.js b/jstests/ssl/initial_sync1_x509.js
index 85198604b57..96a707c6e17 100644
--- a/jstests/ssl/initial_sync1_x509.js
+++ b/jstests/ssl/initial_sync1_x509.js
@@ -11,12 +11,26 @@ var common_options = {
function runInitialSyncTest() {
load("jstests/replsets/rslib.js");
+ // The mongo shell cannot authenticate as the internal __system user in tests that use x509 for
+ // cluster authentication. Choosing the default value for wcMajorityJournalDefault in
+ // ReplSetTest cannot be done automatically without the shell performing such authentication, so
+ // in this test we must make the choice explicitly, based on the global test options.
+ var wcMajorityJournalDefault;
+ if (jsTestOptions().noJournal || jsTestOptions().storageEngine == "ephemeralForTest" ||
+ jsTestOptions().storageEngine == "inMemory") {
+ wcMajorityJournalDefault = false;
+ } else {
+ wcMajorityJournalDefault = true;
+ }
print("1. Bring up set");
- var replTest = new ReplSetTest(
- {name: "jstests_initsync1_x509", nodes: {node0: x509_options1, node1: x509_options2}});
-
+ var replTest = new ReplSetTest({
+ name: "jstests_initsync1_x509",
+ nodes: {node0: x509_options1, node1: x509_options2},
+ });
var conns = replTest.startSet();
- replTest.initiate();
+ replTest.initiate(
+ Object.extend(replTest.getReplSetConfig(),
+ {writeConcernMajorityJournalDefault: wcMajorityJournalDefault}));
var master = replTest.getPrimary();
var foo = master.getDB("foo");