Skip to content

Commit 6a906fc

Browse files
baileympearsondurrannbbeeken
authored
ci(NODE-5012): break apart mongosh integration tests (#3546)
Co-authored-by: Durran Jordan <[email protected]> Co-authored-by: Neal Beeken <[email protected]>
1 parent b1fc872 commit 6a906fc

11 files changed

+452
-144
lines changed

.evergreen/ci_matrix_constants.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
const MONGODB_VERSIONS = ['latest', 'rapid', '6.0', '5.0', '4.4', '4.2', '4.0', '3.6'];
2+
const versions = [
3+
{ codeName: 'erbium', versionNumber: 12 },
4+
{ codeName: 'fermium', versionNumber: 14 },
5+
{ codeName: 'gallium', versionNumber: 16 },
6+
{ codeName: 'hydrogen', versionNumber: 18 }
7+
];
8+
const NODE_VERSIONS = versions.map(({ codeName }) => codeName);
9+
NODE_VERSIONS.sort();
10+
const LOWEST_LTS = NODE_VERSIONS[0];
11+
const LATEST_LTS = NODE_VERSIONS[NODE_VERSIONS.length - 1];
12+
13+
const TOPOLOGIES = ['server', 'replica_set', 'sharded_cluster'];
14+
const AWS_AUTH_VERSIONS = ['latest', '6.0', '5.0', '4.4'];
15+
const TLS_VERSIONS = ['latest', '6.0', '5.0', '4.4', '4.2'];
16+
17+
const DEFAULT_OS = 'rhel80-large';
18+
19+
module.exports = {
20+
MONGODB_VERSIONS,
21+
versions,
22+
NODE_VERSIONS,
23+
LOWEST_LTS,
24+
LATEST_LTS,
25+
TOPOLOGIES,
26+
AWS_AUTH_VERSIONS,
27+
TLS_VERSIONS,
28+
DEFAULT_OS
29+
};

.evergreen/config.in.yml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -317,15 +317,42 @@ functions:
317317
args:
318318
- "${PROJECT_DIRECTORY}/.evergreen/run-typescript.sh"
319319

320-
"run mongosh integration tests":
321-
- command: shell.exec
322-
type: test
320+
###########################################
321+
# mongosh functions
322+
###########################################
323+
"compile mongosh":
324+
- command: subprocess.exec
323325
params:
324-
working_dir: "src"
325-
script: |
326-
${PREPARE_SHELL}
327-
export DISTRO_ID=${distro_id}
328-
bash ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh
326+
working_dir: src
327+
env:
328+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
329+
TASK_ID: ${task_id}
330+
binary: bash
331+
args:
332+
- "${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh"
333+
334+
"run mongosh tests for package":
335+
- command: subprocess.exec
336+
params:
337+
working_dir: src
338+
env:
339+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
340+
TASK_ID: ${task_id}
341+
MONGOSH_RUN_ONLY_IN_PACKAGE: ${mongosh_package}
342+
binary: bash
343+
args:
344+
- "${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh"
345+
346+
"run mongosh package scope test":
347+
- command: subprocess.exec
348+
params:
349+
working_dir: src
350+
env:
351+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
352+
TASK_ID: ${task_id}
353+
binary: bash
354+
args:
355+
- "${PROJECT_DIRECTORY}/.evergreen/run-mongosh-scope-test.sh"
329356

330357
"cleanup":
331358
- command: shell.exec
@@ -375,7 +402,7 @@ functions:
375402
working_dir: "src"
376403
script: |
377404
${PREPARE_SHELL}
378-
NODE_LTS_NAME=${NODE_LTS_NAME} MSVS_VERSION=${MSVS_VERSION} NPM_OPTIONS=${NPM_OPTIONS}\
405+
NODE_LTS_NAME=${NODE_LTS_NAME} NPM_OPTIONS=${NPM_OPTIONS}\
379406
bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh
380407
- command: expansions.update
381408
params:

.evergreen/config.yml

Lines changed: 132 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -281,15 +281,37 @@ functions:
281281
binary: bash
282282
args:
283283
- ${PROJECT_DIRECTORY}/.evergreen/run-typescript.sh
284-
run mongosh integration tests:
285-
- command: shell.exec
286-
type: test
284+
compile mongosh:
285+
- command: subprocess.exec
287286
params:
288287
working_dir: src
289-
script: |
290-
${PREPARE_SHELL}
291-
export DISTRO_ID=${distro_id}
292-
bash ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh
288+
env:
289+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
290+
TASK_ID: ${task_id}
291+
binary: bash
292+
args:
293+
- ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh
294+
run mongosh tests for package:
295+
- command: subprocess.exec
296+
params:
297+
working_dir: src
298+
env:
299+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
300+
TASK_ID: ${task_id}
301+
MONGOSH_RUN_ONLY_IN_PACKAGE: ${mongosh_package}
302+
binary: bash
303+
args:
304+
- ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh
305+
run mongosh package scope test:
306+
- command: subprocess.exec
307+
params:
308+
working_dir: src
309+
env:
310+
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
311+
TASK_ID: ${task_id}
312+
binary: bash
313+
args:
314+
- ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-scope-test.sh
293315
cleanup:
294316
- command: shell.exec
295317
params:
@@ -334,7 +356,7 @@ functions:
334356
working_dir: src
335357
script: |
336358
${PREPARE_SHELL}
337-
NODE_LTS_NAME=${NODE_LTS_NAME} MSVS_VERSION=${MSVS_VERSION} NPM_OPTIONS=${NPM_OPTIONS}\
359+
NODE_LTS_NAME=${NODE_LTS_NAME} NPM_OPTIONS=${NPM_OPTIONS}\
338360
bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh
339361
- command: expansions.update
340362
params:
@@ -2124,15 +2146,6 @@ tasks:
21242146
- func: check types
21252147
vars:
21262148
TS_VERSION: 4.1.6
2127-
- name: run-mongosh-integration-tests
2128-
tags:
2129-
- run-mongosh-integration-tests
2130-
exec_timeout_secs: 3600
2131-
commands:
2132-
- func: install dependencies
2133-
vars:
2134-
NODE_LTS_NAME: gallium
2135-
- func: run mongosh integration tests
21362149
- name: download-and-merge-coverage
21372150
tags: []
21382151
commands:
@@ -2642,6 +2655,99 @@ tasks:
26422655
- func: add aws auth variables to file
26432656
- func: setup aws env
26442657
- func: run lambda handler example tests with aws auth
2658+
- name: run-mongosh-browser-repl
2659+
tags:
2660+
- run-mongosh-integration-tests
2661+
depends_on: compile-mongosh
2662+
commands:
2663+
- func: install dependencies
2664+
vars:
2665+
NODE_LTS_NAME: gallium
2666+
- func: run mongosh tests for package
2667+
vars:
2668+
mongosh_package: browser-repl
2669+
- name: run-mongosh-browser-runtime-electron
2670+
tags:
2671+
- run-mongosh-integration-tests
2672+
depends_on: compile-mongosh
2673+
commands:
2674+
- func: install dependencies
2675+
vars:
2676+
NODE_LTS_NAME: gallium
2677+
- func: run mongosh tests for package
2678+
vars:
2679+
mongosh_package: browser-runtime-electron
2680+
- name: run-mongosh-cli-repl
2681+
tags:
2682+
- run-mongosh-integration-tests
2683+
depends_on: compile-mongosh
2684+
commands:
2685+
- func: install dependencies
2686+
vars:
2687+
NODE_LTS_NAME: gallium
2688+
- func: run mongosh tests for package
2689+
vars:
2690+
mongosh_package: cli-repl
2691+
- name: run-mongosh-connectivity-tests
2692+
tags:
2693+
- run-mongosh-integration-tests
2694+
depends_on: compile-mongosh
2695+
commands:
2696+
- func: install dependencies
2697+
vars:
2698+
NODE_LTS_NAME: gallium
2699+
- func: run mongosh tests for package
2700+
vars:
2701+
mongosh_package: connectivity-tests
2702+
- name: run-mongosh-mongosh
2703+
tags:
2704+
- run-mongosh-integration-tests
2705+
depends_on: compile-mongosh
2706+
commands:
2707+
- func: install dependencies
2708+
vars:
2709+
NODE_LTS_NAME: gallium
2710+
- func: run mongosh tests for package
2711+
vars:
2712+
mongosh_package: mongosh
2713+
- name: run-mongosh-node-runtime-worker-thread
2714+
tags:
2715+
- run-mongosh-integration-tests
2716+
depends_on: compile-mongosh
2717+
commands:
2718+
- func: install dependencies
2719+
vars:
2720+
NODE_LTS_NAME: gallium
2721+
- func: run mongosh tests for package
2722+
vars:
2723+
mongosh_package: node-runtime-worker-thread
2724+
- name: run-mongosh-service-provider-server
2725+
tags:
2726+
- run-mongosh-integration-tests
2727+
depends_on: compile-mongosh
2728+
commands:
2729+
- func: install dependencies
2730+
vars:
2731+
NODE_LTS_NAME: gallium
2732+
- func: run mongosh tests for package
2733+
vars:
2734+
mongosh_package: service-provider-server
2735+
- name: compile-mongosh
2736+
tags:
2737+
- run-mongosh-integration-tests
2738+
commands:
2739+
- func: install dependencies
2740+
vars:
2741+
NODE_LTS_NAME: gallium
2742+
- func: compile mongosh
2743+
- name: verify-mongosh-scopes
2744+
tags:
2745+
- run-mongosh-integration-tests
2746+
commands:
2747+
- func: install dependencies
2748+
vars:
2749+
NODE_LTS_NAME: gallium
2750+
- func: run mongosh package scope test
26452751
task_groups:
26462752
- name: serverless_task_group
26472753
setup_group_can_fail_task: true
@@ -2929,7 +3035,6 @@ buildvariants:
29293035
run_on: windows-64-vs2019-large
29303036
expansions:
29313037
NODE_LTS_NAME: erbium
2932-
MSVS_VERSION: 2019
29333038
tasks:
29343039
- test-latest-server
29353040
- test-latest-replica_set
@@ -2971,7 +3076,6 @@ buildvariants:
29713076
run_on: windows-64-vs2019-large
29723077
expansions:
29733078
NODE_LTS_NAME: fermium
2974-
MSVS_VERSION: 2019
29753079
tasks:
29763080
- test-latest-server
29773081
- test-latest-replica_set
@@ -3013,7 +3117,6 @@ buildvariants:
30133117
run_on: windows-64-vs2019-large
30143118
expansions:
30153119
NODE_LTS_NAME: gallium
3016-
MSVS_VERSION: 2019
30173120
tasks:
30183121
- test-latest-server
30193122
- test-latest-replica_set
@@ -3053,7 +3156,6 @@ buildvariants:
30533156
run_on: windows-64-vs2019-large
30543157
expansions:
30553158
NODE_LTS_NAME: hydrogen
3056-
MSVS_VERSION: 2019
30573159
tasks:
30583160
- test-latest-server
30593161
- test-latest-replica_set
@@ -3115,7 +3217,15 @@ buildvariants:
31153217
display_name: mongosh integration tests
31163218
run_on: ubuntu1804-large
31173219
tasks:
3118-
- run-mongosh-integration-tests
3220+
- run-mongosh-browser-repl
3221+
- run-mongosh-browser-runtime-electron
3222+
- run-mongosh-cli-repl
3223+
- run-mongosh-connectivity-tests
3224+
- run-mongosh-mongosh
3225+
- run-mongosh-node-runtime-worker-thread
3226+
- run-mongosh-service-provider-server
3227+
- compile-mongosh
3228+
- verify-mongosh-scopes
31193229
- name: ubuntu1804-test-mongodb-aws
31203230
display_name: MONGODB-AWS Auth test
31213231
run_on: ubuntu1804-large

0 commit comments

Comments
 (0)