Skip to content

Commit

Permalink
ci(NODE-5012): break apart mongosh integration tests (#3546)
Browse files Browse the repository at this point in the history
Co-authored-by: Durran Jordan <[email protected]>
Co-authored-by: Neal Beeken <[email protected]>
  • Loading branch information
3 people authored Feb 7, 2023
1 parent b1fc872 commit 6a906fc
Show file tree
Hide file tree
Showing 11 changed files with 452 additions and 144 deletions.
29 changes: 29 additions & 0 deletions .evergreen/ci_matrix_constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const MONGODB_VERSIONS = ['latest', 'rapid', '6.0', '5.0', '4.4', '4.2', '4.0', '3.6'];
const versions = [
{ codeName: 'erbium', versionNumber: 12 },
{ codeName: 'fermium', versionNumber: 14 },
{ codeName: 'gallium', versionNumber: 16 },
{ codeName: 'hydrogen', versionNumber: 18 }
];
const NODE_VERSIONS = versions.map(({ codeName }) => codeName);
NODE_VERSIONS.sort();
const LOWEST_LTS = NODE_VERSIONS[0];
const LATEST_LTS = NODE_VERSIONS[NODE_VERSIONS.length - 1];

const TOPOLOGIES = ['server', 'replica_set', 'sharded_cluster'];
const AWS_AUTH_VERSIONS = ['latest', '6.0', '5.0', '4.4'];
const TLS_VERSIONS = ['latest', '6.0', '5.0', '4.4', '4.2'];

const DEFAULT_OS = 'rhel80-large';

module.exports = {
MONGODB_VERSIONS,
versions,
NODE_VERSIONS,
LOWEST_LTS,
LATEST_LTS,
TOPOLOGIES,
AWS_AUTH_VERSIONS,
TLS_VERSIONS,
DEFAULT_OS
};
45 changes: 36 additions & 9 deletions .evergreen/config.in.yml
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,42 @@ functions:
args:
- "${PROJECT_DIRECTORY}/.evergreen/run-typescript.sh"

"run mongosh integration tests":
- command: shell.exec
type: test
###########################################
# mongosh functions
###########################################
"compile mongosh":
- command: subprocess.exec
params:
working_dir: "src"
script: |
${PREPARE_SHELL}
export DISTRO_ID=${distro_id}
bash ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh
working_dir: src
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
TASK_ID: ${task_id}
binary: bash
args:
- "${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh"

"run mongosh tests for package":
- command: subprocess.exec
params:
working_dir: src
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
TASK_ID: ${task_id}
MONGOSH_RUN_ONLY_IN_PACKAGE: ${mongosh_package}
binary: bash
args:
- "${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh"

"run mongosh package scope test":
- command: subprocess.exec
params:
working_dir: src
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
TASK_ID: ${task_id}
binary: bash
args:
- "${PROJECT_DIRECTORY}/.evergreen/run-mongosh-scope-test.sh"

"cleanup":
- command: shell.exec
Expand Down Expand Up @@ -375,7 +402,7 @@ functions:
working_dir: "src"
script: |
${PREPARE_SHELL}
NODE_LTS_NAME=${NODE_LTS_NAME} MSVS_VERSION=${MSVS_VERSION} NPM_OPTIONS=${NPM_OPTIONS}\
NODE_LTS_NAME=${NODE_LTS_NAME} NPM_OPTIONS=${NPM_OPTIONS}\
bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh
- command: expansions.update
params:
Expand Down
154 changes: 132 additions & 22 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -281,15 +281,37 @@ functions:
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-typescript.sh
run mongosh integration tests:
- command: shell.exec
type: test
compile mongosh:
- command: subprocess.exec
params:
working_dir: src
script: |
${PREPARE_SHELL}
export DISTRO_ID=${distro_id}
bash ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
TASK_ID: ${task_id}
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh
run mongosh tests for package:
- command: subprocess.exec
params:
working_dir: src
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
TASK_ID: ${task_id}
MONGOSH_RUN_ONLY_IN_PACKAGE: ${mongosh_package}
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh
run mongosh package scope test:
- command: subprocess.exec
params:
working_dir: src
env:
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
TASK_ID: ${task_id}
binary: bash
args:
- ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-scope-test.sh
cleanup:
- command: shell.exec
params:
Expand Down Expand Up @@ -334,7 +356,7 @@ functions:
working_dir: src
script: |
${PREPARE_SHELL}
NODE_LTS_NAME=${NODE_LTS_NAME} MSVS_VERSION=${MSVS_VERSION} NPM_OPTIONS=${NPM_OPTIONS}\
NODE_LTS_NAME=${NODE_LTS_NAME} NPM_OPTIONS=${NPM_OPTIONS}\
bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh
- command: expansions.update
params:
Expand Down Expand Up @@ -2124,15 +2146,6 @@ tasks:
- func: check types
vars:
TS_VERSION: 4.1.6
- name: run-mongosh-integration-tests
tags:
- run-mongosh-integration-tests
exec_timeout_secs: 3600
commands:
- func: install dependencies
vars:
NODE_LTS_NAME: gallium
- func: run mongosh integration tests
- name: download-and-merge-coverage
tags: []
commands:
Expand Down Expand Up @@ -2642,6 +2655,99 @@ tasks:
- func: add aws auth variables to file
- func: setup aws env
- func: run lambda handler example tests with aws auth
- name: run-mongosh-browser-repl
tags:
- run-mongosh-integration-tests
depends_on: compile-mongosh
commands:
- func: install dependencies
vars:
NODE_LTS_NAME: gallium
- func: run mongosh tests for package
vars:
mongosh_package: browser-repl
- name: run-mongosh-browser-runtime-electron
tags:
- run-mongosh-integration-tests
depends_on: compile-mongosh
commands:
- func: install dependencies
vars:
NODE_LTS_NAME: gallium
- func: run mongosh tests for package
vars:
mongosh_package: browser-runtime-electron
- name: run-mongosh-cli-repl
tags:
- run-mongosh-integration-tests
depends_on: compile-mongosh
commands:
- func: install dependencies
vars:
NODE_LTS_NAME: gallium
- func: run mongosh tests for package
vars:
mongosh_package: cli-repl
- name: run-mongosh-connectivity-tests
tags:
- run-mongosh-integration-tests
depends_on: compile-mongosh
commands:
- func: install dependencies
vars:
NODE_LTS_NAME: gallium
- func: run mongosh tests for package
vars:
mongosh_package: connectivity-tests
- name: run-mongosh-mongosh
tags:
- run-mongosh-integration-tests
depends_on: compile-mongosh
commands:
- func: install dependencies
vars:
NODE_LTS_NAME: gallium
- func: run mongosh tests for package
vars:
mongosh_package: mongosh
- name: run-mongosh-node-runtime-worker-thread
tags:
- run-mongosh-integration-tests
depends_on: compile-mongosh
commands:
- func: install dependencies
vars:
NODE_LTS_NAME: gallium
- func: run mongosh tests for package
vars:
mongosh_package: node-runtime-worker-thread
- name: run-mongosh-service-provider-server
tags:
- run-mongosh-integration-tests
depends_on: compile-mongosh
commands:
- func: install dependencies
vars:
NODE_LTS_NAME: gallium
- func: run mongosh tests for package
vars:
mongosh_package: service-provider-server
- name: compile-mongosh
tags:
- run-mongosh-integration-tests
commands:
- func: install dependencies
vars:
NODE_LTS_NAME: gallium
- func: compile mongosh
- name: verify-mongosh-scopes
tags:
- run-mongosh-integration-tests
commands:
- func: install dependencies
vars:
NODE_LTS_NAME: gallium
- func: run mongosh package scope test
task_groups:
- name: serverless_task_group
setup_group_can_fail_task: true
Expand Down Expand Up @@ -2929,7 +3035,6 @@ buildvariants:
run_on: windows-64-vs2019-large
expansions:
NODE_LTS_NAME: erbium
MSVS_VERSION: 2019
tasks:
- test-latest-server
- test-latest-replica_set
Expand Down Expand Up @@ -2971,7 +3076,6 @@ buildvariants:
run_on: windows-64-vs2019-large
expansions:
NODE_LTS_NAME: fermium
MSVS_VERSION: 2019
tasks:
- test-latest-server
- test-latest-replica_set
Expand Down Expand Up @@ -3013,7 +3117,6 @@ buildvariants:
run_on: windows-64-vs2019-large
expansions:
NODE_LTS_NAME: gallium
MSVS_VERSION: 2019
tasks:
- test-latest-server
- test-latest-replica_set
Expand Down Expand Up @@ -3053,7 +3156,6 @@ buildvariants:
run_on: windows-64-vs2019-large
expansions:
NODE_LTS_NAME: hydrogen
MSVS_VERSION: 2019
tasks:
- test-latest-server
- test-latest-replica_set
Expand Down Expand Up @@ -3115,7 +3217,15 @@ buildvariants:
display_name: mongosh integration tests
run_on: ubuntu1804-large
tasks:
- run-mongosh-integration-tests
- run-mongosh-browser-repl
- run-mongosh-browser-runtime-electron
- run-mongosh-cli-repl
- run-mongosh-connectivity-tests
- run-mongosh-mongosh
- run-mongosh-node-runtime-worker-thread
- run-mongosh-service-provider-server
- compile-mongosh
- verify-mongosh-scopes
- name: ubuntu1804-test-mongodb-aws
display_name: MONGODB-AWS Auth test
run_on: ubuntu1804-large
Expand Down
Loading

0 comments on commit 6a906fc

Please sign in to comment.