@@ -74,10 +74,7 @@ const OPERATING_SYSTEMS = [
7474 )
7575) ;
7676
77- const WINDOWS_SKIP_TAGS = new Set ( [
78- 'atlas-connect' ,
79- 'auth'
80- ] ) ;
77+ const WINDOWS_SKIP_TAGS = new Set ( [ 'atlas-connect' , 'auth' ] ) ;
8178
8279const BASE_TASKS = [ ] ;
8380const TASKS = [ ] ;
@@ -109,9 +106,7 @@ function makeTask({ mongoVersion, topology }) {
109106}
110107
111108MONGODB_VERSIONS . forEach ( mongoVersion => {
112- TOPOLOGIES . forEach ( topology =>
113- BASE_TASKS . push ( makeTask ( { mongoVersion, topology } ) )
114- ) ;
109+ TOPOLOGIES . forEach ( topology => BASE_TASKS . push ( makeTask ( { mongoVersion, topology } ) ) ) ;
115110} ) ;
116111
117112TASKS . push (
@@ -125,7 +120,8 @@ TASKS.push(
125120 tags : [ 'auth' , 'kerberos' , 'legacy' ] ,
126121 commands : [
127122 { func : 'install dependencies' } ,
128- { func : 'run kerberos tests' ,
123+ {
124+ func : 'run kerberos tests' ,
129125 vars : {
130126 UNIFIED : 0
131127 }
@@ -137,7 +133,8 @@ TASKS.push(
137133 tags : [ 'auth' , 'kerberos' , 'unified' ] ,
138134 commands : [
139135 { func : 'install dependencies' } ,
140- { func : 'run kerberos tests' ,
136+ {
137+ func : 'run kerberos tests' ,
141138 vars : {
142139 UNIFIED : 1
143140 }
@@ -296,7 +293,7 @@ OCSP_VERSIONS.forEach(VERSION => {
296293const AWS_AUTH_TASKS = [ ] ;
297294
298295AWS_AUTH_VERSIONS . forEach ( VERSION => {
299- const name = ( ex ) => `aws-${ VERSION } -auth-test-${ ex . split ( ' ' ) . join ( '-' ) } ` ;
296+ const name = ex => `aws-${ VERSION } -auth-test-${ ex . split ( ' ' ) . join ( '-' ) } ` ;
300297 // AWS_AUTH_TASKS.push(name);
301298
302299 const aws_funcs = [
@@ -325,10 +322,10 @@ AWS_AUTH_VERSIONS.forEach(VERSION => {
325322 { func : 'setup aws env' } ,
326323 fn
327324 ]
328- } ) )
325+ } ) ) ;
329326
330327 TASKS . push ( ...aws_tasks ) ;
331- AWS_AUTH_TASKS . push ( ...aws_tasks . map ( t => t . name ) )
328+ AWS_AUTH_TASKS . push ( ...aws_tasks . map ( t => t . name ) ) ;
332329} ) ;
333330
334331const BUILD_VARIANTS = [ ] ;
@@ -342,31 +339,33 @@ const getTaskList = (() => {
342339 return memo [ key ] ;
343340 }
344341 const taskList = BASE_TASKS . concat ( TASKS ) ;
345- const ret = taskList . filter ( task => {
346- if ( task . name . match ( / ^ a w s / ) ) return false ;
342+ const ret = taskList
343+ . filter ( task => {
344+ if ( task . name . match ( / ^ a w s / ) ) return false ;
347345
348- // skip unsupported tasks on windows
349- if ( os . match ( / ^ w i n d o w s / ) && task . tags . filter ( tag => WINDOWS_SKIP_TAGS . has ( tag ) ) . length ) {
350- return false ;
351- }
346+ // skip unsupported tasks on windows
347+ if ( os . match ( / ^ w i n d o w s / ) && task . tags . filter ( tag => WINDOWS_SKIP_TAGS . has ( tag ) ) . length ) {
348+ return false ;
349+ }
352350
353- const tasksWithVars = task . commands . filter ( task => ! ! task . vars ) ;
354- if ( ! tasksWithVars . length ) {
355- return true ;
356- }
351+ const tasksWithVars = task . commands . filter ( task => ! ! task . vars ) ;
352+ if ( ! tasksWithVars . length ) {
353+ return true ;
354+ }
357355
358- // kerberos tests don't require mongo orchestration
359- if ( task . tags . filter ( tag => tag === 'kerberos' ) . length ) {
360- return true ;
361- }
356+ // kerberos tests don't require mongo orchestration
357+ if ( task . tags . filter ( tag => tag === 'kerberos' ) . length ) {
358+ return true ;
359+ }
362360
363- const { VERSION } = tasksWithVars [ 0 ] . vars || { } ;
364- if ( VERSION === 'latest' ) {
365- return semver . satisfies ( semver . coerce ( LATEST_EFFECTIVE_VERSION ) , mongoVersion ) ;
366- }
361+ const { VERSION } = tasksWithVars [ 0 ] . vars || { } ;
362+ if ( VERSION === 'latest' ) {
363+ return semver . satisfies ( semver . coerce ( LATEST_EFFECTIVE_VERSION ) , mongoVersion ) ;
364+ }
367365
368- return semver . satisfies ( semver . coerce ( VERSION ) , mongoVersion ) ;
369- } ) . map ( x => x . name ) ;
366+ return semver . satisfies ( semver . coerce ( VERSION ) , mongoVersion ) ;
367+ } )
368+ . map ( x => x . name ) ;
370369
371370 memo [ key ] = ret ;
372371 return ret ;
@@ -419,38 +418,48 @@ SINGLETON_TASKS.push({
419418 ]
420419} ) ;
421420
422- SINGLETON_TASKS . push ( {
423- name : 'run-custom-csfle-tests' ,
424- tags : [ 'run-custom-csfle-tests' ] ,
421+ const oneOffFuncs = [
422+ { func : 'run custom csfle tests' , vars : { UNIFIED : 1 , NODE_LTS_NAME : 'erbium' } } ,
423+ { func : 'run custom snappy tests' , vars : { UNIFIED : 1 , NODE_LTS_NAME : 'erbium' } }
424+ ] ;
425+
426+ const oneOffFuncAsTasks = oneOffFuncs . map ( oneOffFunc => ( {
427+ name : `${ oneOffFunc . func . split ( ' ' ) . join ( '-' ) } ` ,
428+ tags : [ 'run-custom-dependency-tests' ] ,
425429 commands : [
426430 {
427431 func : 'install dependencies' ,
428432 vars : {
429- NODE_LTS_NAME : 'erbium' ,
430- } ,
433+ NODE_LTS_NAME : 'erbium'
434+ }
431435 } ,
432436 {
433437 func : 'bootstrap mongo-orchestration' ,
434438 vars : {
435- VERSION : '4.4 ' ,
439+ VERSION : '5.0 ' ,
436440 TOPOLOGY : 'server'
437441 }
438442 } ,
439- { func : 'run custom csfle tests' }
443+ oneOffFunc
440444 ]
441- } ) ;
445+ } ) ) ;
442446
443- BUILD_VARIANTS . push ( {
444- name : 'lint' ,
445- display_name : 'lint' ,
446- run_on : 'rhel70' ,
447- tasks : [ 'run-checks' ]
448- } , {
449- name : 'ubuntu1804-custom-csfle-tests' ,
450- display_name : 'Custom FLE Version Test' ,
451- run_on : 'ubuntu1804-test' ,
452- tasks : [ 'run-custom-csfle-tests' ]
453- } ) ;
447+ SINGLETON_TASKS . push ( ...oneOffFuncAsTasks ) ;
448+
449+ BUILD_VARIANTS . push (
450+ {
451+ name : 'lint' ,
452+ display_name : 'lint' ,
453+ run_on : 'rhel70' ,
454+ tasks : [ 'run-checks' ]
455+ } ,
456+ {
457+ name : 'ubuntu1804-custom-dependency-tests' ,
458+ display_name : 'Custom Dependency Version Test' ,
459+ run_on : 'ubuntu1804-large' ,
460+ tasks : oneOffFuncAsTasks . map ( ( { name } ) => name )
461+ }
462+ ) ;
454463
455464// special case for MONGODB-AWS authentication
456465BUILD_VARIANTS . push ( {
@@ -464,7 +473,7 @@ BUILD_VARIANTS.push({
464473} ) ;
465474
466475const fileData = yaml . safeLoad ( fs . readFileSync ( `${ __dirname } /config.yml.in` , 'utf8' ) ) ;
467- fileData . tasks = ( fileData . tasks || [ ] ) . concat ( BASE_TASKS ) . concat ( TASKS ) . concat ( SINGLETON_TASKS ) ;
476+ fileData . tasks = ( fileData . tasks || [ ] ) . concat ( BASE_TASKS , TASKS , SINGLETON_TASKS ) ;
468477fileData . buildvariants = ( fileData . buildvariants || [ ] ) . concat ( BUILD_VARIANTS ) ;
469478
470479fs . writeFileSync ( `${ __dirname } /config.yml` , yaml . safeDump ( fileData , { lineWidth : 120 } ) , 'utf8' ) ;
0 commit comments