summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/set_user_write_block_mode.js
diff options
context:
space:
mode:
authorJordi Serra Torrens <jordi.serra-torrens@mongodb.com>2022-03-10 20:00:15 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-03-10 20:52:09 +0000
commit4ba31bc8627426538307848866d3165a17aa29fb (patch)
treedbafc19f2050b915dc5da92c3e353e862fe0bf17 /jstests/noPassthrough/set_user_write_block_mode.js
parent11d01816f743d6764c4f12c42697f5edf813ce27 (diff)
downloadmongo-4ba31bc8627426538307848866d3165a17aa29fb.tar.gz
SERVER-64245 Make SetUserWriteBlockModeCoordinator set the write blocking state on the shards
Diffstat (limited to 'jstests/noPassthrough/set_user_write_block_mode.js')
-rw-r--r--jstests/noPassthrough/set_user_write_block_mode.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/jstests/noPassthrough/set_user_write_block_mode.js b/jstests/noPassthrough/set_user_write_block_mode.js
index 48e7ef8cee9..484f14876b0 100644
--- a/jstests/noPassthrough/set_user_write_block_mode.js
+++ b/jstests/noPassthrough/set_user_write_block_mode.js
@@ -3,9 +3,10 @@
// @tags: [
// creates_and_authenticates_user,
// requires_auth,
-// requires_fcv_53,
+// requires_fcv_60,
// requires_non_retryable_commands,
// requires_replication,
+// featureFlagUserWriteBlocking,
// ]
(function() {
@@ -40,10 +41,10 @@ const bypassUser = "adminUser";
const noBypassUser = "user";
const password = "password";
-function runTest(frontend, backend) {
+function runTest(frontend) {
const db = frontend.getDB(jsTestName());
const coll = db.test;
- const admin = backend.getDB('admin');
+ const admin = frontend.getDB('admin');
function asUser(user, fun) {
assert(admin.auth(user, password));
@@ -103,7 +104,7 @@ function runTest(frontend, backend) {
// Test on standalone
const conn = MongoRunner.runMongod({auth: "", bind_ip: "127.0.0.1"});
-runTest(conn, conn);
+runTest(conn);
MongoRunner.stopMongod(conn);
const keyfile = "jstests/libs/key1";
@@ -113,12 +114,11 @@ const rst = new ReplSetTest({nodes: 3, nodeOptions: {auth: "", bind_ip_all: ""},
rst.startSet();
rst.initiate();
const primary = rst.getPrimary();
-runTest(primary, primary);
+runTest(primary);
rst.stopSet();
-// TODO: SERVER-64245 reenable this test case
-// // Test on a sharded cluster
-// const st = new ShardingTest({shards: 1, mongos: 1, config: 1});
-// runTest(st.s0, st.rs0.getPrimary());
-// st.stop();
+// Test on a sharded cluster
+const st = new ShardingTest({shards: 1, mongos: 1, config: 1, auth: "", other: {keyFile: keyfile}});
+runTest(st.s);
+st.stop();
})();