@@ -95,14 +95,28 @@ function translateClientOptions(options) {
95
95
return options ;
96
96
}
97
97
98
+ function isRelaxed ( fileName ) {
99
+ return (
100
+ ! fileName . includes ( 'fle2-CreateCollection' ) &&
101
+ ! fileName . includes ( 'fle2-BypassQueryAnalysis' ) &&
102
+ ! fileName . includes ( 'fle2-validatorAndPartialFieldExpression' ) &&
103
+ ! fileName . includes ( 'fle2-EncryptedFields-vs-jsonSchema' ) &&
104
+ ! fileName . includes ( 'fle2-FindOneAndUpdate' ) &&
105
+ ! fileName . includes ( 'fle2-InsertFind-Indexed' ) &&
106
+ ! fileName . includes ( 'fle2-InsertFind-Unindexed' ) &&
107
+ ! fileName . includes ( 'fle2-Update' ) &&
108
+ ! fileName . includes ( 'fle2-Delete' )
109
+ ) ;
110
+ }
111
+
98
112
function gatherTestSuites ( specPath ) {
99
113
return fs
100
114
. readdirSync ( specPath )
101
115
. filter ( x => x . indexOf ( '.json' ) !== - 1 )
102
116
. map ( x =>
103
117
Object . assign (
104
118
EJSON . parse ( fs . readFileSync ( path . join ( specPath , x ) ) , {
105
- relaxed : ! x . includes ( 'fle2-CreateCollection' )
119
+ relaxed : isRelaxed ( x )
106
120
} ) ,
107
121
{
108
122
name : path . basename ( x , '.json' )
@@ -206,23 +220,25 @@ function generateTopologyTests(testSuites, testContext, filter) {
206
220
beforeEach ( beforeEachFilter ) ;
207
221
beforeEach ( ( ) => prepareDatabaseForSuite ( testSuite , testContext ) ) ;
208
222
afterEach ( ( ) => testContext . cleanupAfterSuite ( ) ) ;
209
- for ( const spec of testSuite . tests ) {
210
- const mochaTest = it ( spec . description , async function ( ) {
211
- if ( spec . failPoint ) {
212
- await testContext . enableFailPoint ( spec . failPoint ) ;
213
- }
223
+ if ( testSuite . name . includes ( 'fle2-' ) ) {
224
+ for ( const spec of testSuite . tests ) {
225
+ const mochaTest = it ( spec . description , async function ( ) {
226
+ if ( spec . failPoint ) {
227
+ await testContext . enableFailPoint ( spec . failPoint ) ;
228
+ }
214
229
215
- // run the actual test
216
- await runTestSuiteTest ( this . configuration , spec , testContext ) ;
230
+ // run the actual test
231
+ await runTestSuiteTest ( this . configuration , spec , testContext ) ;
217
232
218
- if ( spec . failPoint ) {
219
- await testContext . disableFailPoint ( spec . failPoint ) ;
220
- }
233
+ if ( spec . failPoint ) {
234
+ await testContext . disableFailPoint ( spec . failPoint ) ;
235
+ }
221
236
222
- await validateOutcome ( spec , testContext ) ;
223
- } ) ;
224
- // Make the spec test available to the beforeEach filter
225
- mochaTest . spec = spec ;
237
+ await validateOutcome ( spec , testContext ) ;
238
+ } ) ;
239
+ // Make the spec test available to the beforeEach filter
240
+ mochaTest . spec = spec ;
241
+ }
226
242
}
227
243
} ) ;
228
244
}
0 commit comments