summaryrefslogtreecommitdiff
path: root/src/mongo/shell
diff options
context:
space:
mode:
authorShreyas Kalyan <shreyas.kalyan@10gen.com>2021-02-18 20:30:26 -0800
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-11 22:34:41 +0000
commit0a8e18fc892eb6c214264d4bb94aad5d667180e8 (patch)
tree8ea7c584d625a7a454a3d04e14725edfe60d0e57 /src/mongo/shell
parent369c190734bd0cd4931a8cdc3e8af93666d925b5 (diff)
downloadmongo-0a8e18fc892eb6c214264d4bb94aad5d667180e8.tar.gz
SERVER-52943 Add a sharding variant for the Audit Log Spooler
Diffstat (limited to 'src/mongo/shell')
-rw-r--r--src/mongo/shell/servers.js10
-rw-r--r--src/mongo/shell/shardingtest.js12
2 files changed, 22 insertions, 0 deletions
diff --git a/src/mongo/shell/servers.js b/src/mongo/shell/servers.js
index f11f9436900..fb0cea95612 100644
--- a/src/mongo/shell/servers.js
+++ b/src/mongo/shell/servers.js
@@ -761,6 +761,11 @@ MongoRunner.mongodOptions = function(opts = {}) {
opts.auditDestination = jsTestOptions().auditDestination;
}
+ if (opts.hasOwnProperty("auditPath")) {
+ // We need to reformat the auditPath to include the proper port
+ opts.auditPath = MongoRunner.toRealPath(opts.auditPath, opts);
+ }
+
if (opts.noReplSet)
opts.replSet = null;
if (opts.arbiter)
@@ -819,6 +824,11 @@ MongoRunner.mongosOptions = function(opts) {
opts.binVersion = MongoRunner.getBinVersionFor(testOptions.mongosBinVersion);
}
+ if (opts.hasOwnProperty("auditPath")) {
+ // We need to reformat the auditPath to include the proper port
+ opts.auditPath = MongoRunner.toRealPath(opts.auditPath, opts);
+ }
+
_removeSetParameterIfBeforeVersion(
opts, "mongosShutdownTimeoutMillisForSignaledShutdown", "4.5.0", true);
diff --git a/src/mongo/shell/shardingtest.js b/src/mongo/shell/shardingtest.js
index 723e94d1b96..b77131ab170 100644
--- a/src/mongo/shell/shardingtest.js
+++ b/src/mongo/shell/shardingtest.js
@@ -474,6 +474,18 @@ var ShardingTest = function(params) {
});
};
+ this.forEachMongos = function(fn) {
+ this._mongos.forEach(function(conn) {
+ fn(conn);
+ });
+ };
+
+ this.forEachConfigServer = function(fn) {
+ this._configServers.forEach(function(conn) {
+ fn(conn);
+ });
+ };
+
this.printChangeLog = function() {
this.config.changelog.find().forEach(function(z) {
var msg = z.server + "\t" + z.time + "\t" + z.what;