SERVER-99146 Disallow committing imports of ShardingTest and ReplSetTest (#32551)

GitOrigin-RevId: eee32df9872e74b3f48c7eb1a7b87765a982bed3
This commit is contained in:
Aitor Esteve Alvarado 2025-08-19 19:36:00 +02:00 committed by MongoDB Bot
parent b168f5e8ae
commit 551dd3517e
2 changed files with 11 additions and 1 deletions

View File

@ -43,3 +43,14 @@ rules:
semi: 2
use-isnan: 2
valid-typeof: 2
no-restricted-syntax: [
'error',
{
message: "Invalid import. Please do not import replsettest.js in MongoDB v8.0 and below.",
selector: "ImportDeclaration[source.value=/^jstests\\u002Flibs\\u002Freplsettest.js$/]"
},
{
message: "Invalid import. Please do not import shardingtest.js in MongoDB v8.0 and below.",
selector: "ImportDeclaration[source.value=/^jstests\\u002Flibs\\u002Fshardingtest.js$/]"
},
]

View File

@ -10,7 +10,6 @@
* ]
*/
import {configureFailPoint} from "jstests/libs/fail_point_util.js";
import {ReplSetTest} from "jstests/libs/replsettest.js";
import {IndexBuildTest} from "jstests/noPassthrough/libs/index_build.js";
const rst = new ReplSetTest({nodes: 2});