Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ functions:
script: |
${PREPARE_SHELL}
bash ${PROJECT_DIRECTORY}/.evergreen/run-checks.sh
run mongosh integration tests:
- command: shell.exec
type: test
params:
working_dir: src
script: |
${PREPARE_SHELL}
bash ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh
cleanup:
- command: shell.exec
params:
Expand Down Expand Up @@ -1132,6 +1140,15 @@ tasks:
vars:
NODE_LTS_NAME: erbium
- func: run checks
- name: run-mongosh-integration-tests
tags:
- run-mongosh-integration-tests
exec_timeout_secs: 3600
commands:
- func: install dependencies
vars:
NODE_LTS_NAME: fermium
- func: run mongosh integration tests
buildvariants:
- name: macos-1014-dubnium
display_name: macOS 10.14 Node Dubnium
Expand Down Expand Up @@ -1359,6 +1376,11 @@ buildvariants:
run_on: rhel70
tasks:
- run-checks
- name: mongosh_integration_tests
display_name: mongosh integration tests
run_on: ubuntu1804-test
tasks:
- run-mongosh-integration-tests
- name: ubuntu1804-test-mongodb-aws
display_name: MONGODB-AWS Auth test
run_on: ubuntu1804-test
Expand Down
13 changes: 11 additions & 2 deletions .evergreen/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,15 @@ functions:
${PREPARE_SHELL}
bash ${PROJECT_DIRECTORY}/.evergreen/run-checks.sh

"run mongosh integration tests":
- command: shell.exec
type: test
params:
working_dir: "src"
script: |
${PREPARE_SHELL}
bash ${PROJECT_DIRECTORY}/.evergreen/run-mongosh-integration-tests.sh

"cleanup":
- command: shell.exec
params:
Expand Down Expand Up @@ -253,7 +262,7 @@ functions:
script: |
MONGODB_URI='${plain_auth_mongodb_uri}' NODE_LTS_NAME='${NODE_LTS_NAME}' \
bash ${PROJECT_DIRECTORY}/.evergreen/run-ldap-tests.sh

"run data lake tests":
- command: shell.exec
type: test
Expand All @@ -262,7 +271,7 @@ functions:
script: |
MONGODB_URI='mongodb://mhuser:pencil@localhost' NODE_LTS_NAME='${NODE_LTS_NAME}' \
bash ${PROJECT_DIRECTORY}/.evergreen/run-data-lake-tests.sh

"run tls tests":
- command: shell.exec
type: test
Expand Down
24 changes: 23 additions & 1 deletion .evergreen/generate_evergreen_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,30 @@ BUILD_VARIANTS.push({
tasks: ['run-checks']
});

// special case for MONGODB-AWS authentication
// singleton build variant for mongosh integration tests
SINGLETON_TASKS.push({
name: 'run-mongosh-integration-tests',
tags: ['run-mongosh-integration-tests'],
exec_timeout_secs: 3600,
commands: [
{
func: 'install dependencies',
vars: {
NODE_LTS_NAME: 'fermium'
}
},
{ func: 'run mongosh integration tests' }
]
});

BUILD_VARIANTS.push({
name: 'mongosh_integration_tests',
display_name: 'mongosh integration tests',
run_on: 'ubuntu1804-test',
tasks: ['run-mongosh-integration-tests']
});

// special case for MONGODB-AWS authentication
BUILD_VARIANTS.push({
name: 'ubuntu1804-test-mongodb-aws',
display_name: 'MONGODB-AWS Auth test',
Expand Down
16 changes: 16 additions & 0 deletions .evergreen/run-mongosh-integration-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -o errexit # Exit the script with error if any of the commands fail
set -o xtrace # Write all commands first to stderr

export PROJECT_DIRECTORY="$(pwd)"
NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts"
export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

npm pack | tee npm-pack.log
export TARBALL_FILENAME="$(tail -n1 npm-pack.log)"
cd /tmp
git clone --depth=10 https://github.com/mongodb-js/mongosh.git
cd mongosh
export REPLACE_PACKAGE="mongodb:${PROJECT_DIRECTORY}/${TARBALL_FILENAME}"
npm run test-nodedriver