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

GitOrigin-RevId: 581f358187f5dc9a2e2c50ef15006f9c5a275e92
This commit is contained in:
Aitor Esteve Alvarado 2025-06-23 22:30:18 +02:00 committed by MongoDB Bot
parent 6c65bde621
commit 30ef1685af
1 changed files with 9 additions and 1 deletions

View File

@ -24,7 +24,15 @@ rules:
message: "Invalid load call. Please convert your library to a module and import it instead.", message: "Invalid load call. Please convert your library to a module and import it instead.",
selector: selector:
'CallExpression > Identifier[name="load"]' 'CallExpression > Identifier[name="load"]'
} },
{
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$/]"
},
] ]
globals: globals: