summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharlie Swanson <charlie.swanson@mongodb.com>2022-12-16 22:33:32 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-12-16 23:59:42 +0000
commit8d7b0e9762354d599d9e3d2e9b5c62da8e4694f1 (patch)
tree25cf591003e453587f84276e5e8b081f1bb5fb56
parent946cecc98dfb0047855add41fc344a1ffbb2baa9 (diff)
downloadmongo-8d7b0e9762354d599d9e3d2e9b5c62da8e4694f1.tar.gz
SERVER-72131 Fix auth tests to run in evergreen
-rw-r--r--jstests/sharding/all_collection_stats_auth.js7
-rw-r--r--jstests/sharding/sharded_data_distribution_auth.js7
2 files changed, 2 insertions, 12 deletions
diff --git a/jstests/sharding/all_collection_stats_auth.js b/jstests/sharding/all_collection_stats_auth.js
index caafe005631..4f1a21542c4 100644
--- a/jstests/sharding/all_collection_stats_auth.js
+++ b/jstests/sharding/all_collection_stats_auth.js
@@ -9,11 +9,6 @@
(function() {
'use strict';
-if (!TestData.auth) {
- jsTestLog("Skipping testing authorization since auth is not enabled");
- return;
-}
-
// Test privileges
function testPrivileges() {
// Create new role with the exact privileges to execute $allCollectionStats
@@ -66,7 +61,7 @@ function testPrivileges() {
}
// Configure initial sharding cluster
-const st = new ShardingTest({shards: 1});
+const st = new ShardingTest({shards: 1, keyFile: 'jstests/libs/key1'});
const mongos = st.s;
const ns1 = "test.foo";
diff --git a/jstests/sharding/sharded_data_distribution_auth.js b/jstests/sharding/sharded_data_distribution_auth.js
index 5d1318bc287..a83cb264d7f 100644
--- a/jstests/sharding/sharded_data_distribution_auth.js
+++ b/jstests/sharding/sharded_data_distribution_auth.js
@@ -9,11 +9,6 @@
(function() {
'use strict';
-if (!TestData.auth) {
- jsTestLog("Skipping testing authorization since auth is not enabled");
- return;
-}
-
// Test privileges
function testPrivileges() {
// Create new role with the exact privileges to execute $shardedDataDistribution
@@ -56,7 +51,7 @@ function testPrivileges() {
}
// Configure initial sharding cluster
-const st = new ShardingTest({shards: 1});
+const st = new ShardingTest({shards: 1, keyFile: 'jstests/libs/key1'});
const mongos = st.s;
const ns1 = "test.foo";