summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorJason Zhang <jason.zhang@mongodb.com>2021-02-09 03:11:14 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-02-12 00:35:48 +0000
commit0970cd1d4ac6f14c1470d566c446cb96bd684b8e (patch)
tree25530d37b0d8efe1284e0f66c0ac62fadcbba5a4 /buildscripts
parent9dfb7e0b38f0fa2648d7dcbe17a38a2ff532ab01 (diff)
downloadmongo-0970cd1d4ac6f14c1470d566c446cb96bd684b8e.tar.gz
SERVER-53496 Make TenantMigrationFixture take in separate mongod options for each replica set
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/resmokeconfig/suites/tenant_migration_jscore_passthrough.yml7
-rw-r--r--buildscripts/resmokelib/testing/fixtures/tenant_migration.py11
2 files changed, 12 insertions, 6 deletions
diff --git a/buildscripts/resmokeconfig/suites/tenant_migration_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/tenant_migration_jscore_passthrough.yml
index 26a191d3d50..062bf0241eb 100644
--- a/buildscripts/resmokeconfig/suites/tenant_migration_jscore_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/tenant_migration_jscore_passthrough.yml
@@ -115,7 +115,7 @@ executor:
n: 20
fixture:
class: TenantMigrationFixture
- mongod_options:
+ common_mongod_options:
set_parameters:
enableTestCommands: 1
failpoint.abortTenantMigrationBeforeLeavingBlockingState:
@@ -129,8 +129,11 @@ executor:
ttlMonitorSleepSecs: 1
tlsMode: allowTLS
tlsCAFile: jstests/libs/ca.pem
- tlsCertificateKeyFile: jstests/libs/rs0.pem
tlsAllowInvalidHostnames: ''
+ per_mongod_options:
+ # Each entry is for a different replica set's extra mongod options.
+ - tlsCertificateKeyFile: jstests/libs/rs0.pem
+ - tlsCertificateKeyFile: jstests/libs/rs1.pem
num_replica_sets: 2
num_nodes_per_replica_set: 3
use_replica_set_connection_string: true
diff --git a/buildscripts/resmokelib/testing/fixtures/tenant_migration.py b/buildscripts/resmokelib/testing/fixtures/tenant_migration.py
index c1fce354893..5b4a52a1a34 100644
--- a/buildscripts/resmokelib/testing/fixtures/tenant_migration.py
+++ b/buildscripts/resmokelib/testing/fixtures/tenant_migration.py
@@ -14,8 +14,9 @@ class TenantMigrationFixture(interface.Fixture): # pylint: disable=too-many-ins
"""Fixture which provides JSTests with a set of replica sets to run tenant migration against."""
def __init__( # pylint: disable=too-many-arguments,too-many-locals
- self, logger, job_num, mongod_options=None, dbpath_prefix=None, preserve_dbpath=False,
- num_replica_sets=1, num_nodes_per_replica_set=2, start_initial_sync_node=False,
+ self, logger, job_num, common_mongod_options=None, per_mongod_options=None,
+ dbpath_prefix=None, preserve_dbpath=False, num_replica_sets=1,
+ num_nodes_per_replica_set=2, start_initial_sync_node=False,
write_concern_majority_journal_default=None, auth_options=None,
replset_config_options=None, voting_secondaries=True, all_nodes_electable=False,
use_replica_set_connection_string=None, linear_chain=False, mixed_bin_versions=None,
@@ -24,7 +25,8 @@ class TenantMigrationFixture(interface.Fixture): # pylint: disable=too-many-ins
interface.Fixture.__init__(self, logger, job_num, dbpath_prefix=dbpath_prefix)
- self.mongod_options = utils.default_if_none(mongod_options, {})
+ self.common_mongod_options = utils.default_if_none(common_mongod_options, {})
+ self.per_mongod_options = utils.default_if_none(per_mongod_options, {})
self.preserve_dbpath = preserve_dbpath
self.start_initial_sync_node = start_initial_sync_node
self.write_concern_majority_journal_default = write_concern_majority_journal_default
@@ -68,7 +70,8 @@ class TenantMigrationFixture(interface.Fixture): # pylint: disable=too-many-ins
if not self.replica_sets:
for i in range(self.num_replica_sets):
rs_name = f"rs{i}"
- mongod_options = self.mongod_options.copy()
+ mongod_options = self.common_mongod_options.copy()
+ mongod_options.update(self.per_mongod_options[i])
mongod_options["dbpath"] = os.path.join(self._dbpath_prefix, rs_name)
mongod_options["replSet"] = rs_name