@@ -5,16 +5,15 @@ const fs = require('fs');
5
5
const yaml = require ( 'js-yaml' ) ;
6
6
7
7
const LATEST_EFFECTIVE_VERSION = '5.0' ;
8
- const MONGODB_VERSIONS = [ 'latest' , '4.4' , '4.2' , '4.0' , '3.6' , '3.4' , '3.2' , '3.0' , '2.6' ] ;
8
+ const LEGACY_MONGODB_VERSIONS = new Set ( [ '4.4' , '4.2' , '4.0' , '3.6' , '3.4' , '3.2' , '3.0' , '2.6' ] ) ;
9
+ const MONGODB_VERSIONS = [ 'latest' ] . concat ( Array . from ( LEGACY_MONGODB_VERSIONS ) ) ;
9
10
const AWS_AUTH_VERSIONS = [ 'latest' , '4.4' ] ;
10
11
const OCSP_VERSIONS = [ 'latest' , '4.4' ] ;
11
12
const TLS_VERSIONS = [ 'latest' , '4.2' ] ; // also test on 4.2 because 4.4+ currently skipped on windows
12
13
const NODE_VERSIONS = [ 'fermium' , 'erbium' , 'dubnium' , 'carbon' , 'boron' , 'argon' ] ;
13
- const TOPOLOGIES = [ 'server' , 'replica_set' , 'sharded_cluster' ] . concat ( [
14
- 'server-unified' ,
15
- 'replica_set-unified' ,
16
- 'sharded_cluster-unified'
17
- ] ) ;
14
+ const LEGACY_TOPOLOGIES = new Set ( [ 'server' , 'replica_set' , 'sharded_cluster' ] ) ;
15
+ const UNIFIED_TOPOLOGIES = Array . from ( LEGACY_TOPOLOGIES ) . map ( topology => `${ topology } -unified` ) ;
16
+
18
17
19
18
const OPERATING_SYSTEMS = [
20
19
{
@@ -110,10 +109,16 @@ function makeTask({ mongoVersion, topology }) {
110
109
}
111
110
112
111
MONGODB_VERSIONS . forEach ( mongoVersion => {
113
- TOPOLOGIES . forEach ( topology =>
112
+ Array . from ( LEGACY_TOPOLOGIES ) . concat ( UNIFIED_TOPOLOGIES ) . forEach ( topology => {
113
+ if ( LEGACY_TOPOLOGIES . has ( topology ) && ! LEGACY_MONGODB_VERSIONS . has ( mongoVersion ) ) {
114
+ // MongoDB 5.0+ is only supported by the Unified Topology in driver 3.7+
115
+ // therefore testing the legacy toplogy can be skipped
116
+ return ;
117
+ }
114
118
BASE_TASKS . push ( makeTask ( { mongoVersion, topology } ) )
115
- ) ;
119
+ } ) ;
116
120
} ) ;
121
+
117
122
BASE_TASKS . push ( {
118
123
name : `test-latest-server-v1-api` ,
119
124
tags : [ 'latest' , 'server' , 'v1-api' ] ,
0 commit comments