From e1c8c3bfac4a2f400ae83b3a7d3981611a4fd9df Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Thu, 19 Oct 2023 17:49:47 -0400 Subject: [PATCH] test: remove mongosh integration tests (#3850) --- .evergreen/config.in.yml | 37 ------- .evergreen/config.yml | 133 ------------------------- .evergreen/generate_evergreen_tasks.js | 49 ++++----- .evergreen/generate_mongosh_tasks.js | 67 ------------- 4 files changed, 19 insertions(+), 267 deletions(-) delete mode 100644 .evergreen/generate_mongosh_tasks.js diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index f6a5524c04..919e8ebfc7 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -411,43 +411,6 @@ functions: args: - "${PROJECT_DIRECTORY}/.evergreen/run-typescript.sh" - ########################################### - # mongosh functions - ########################################### - "compile mongosh": - - command: subprocess.exec - params: - 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" - "reset aws instance profile": - command: shell.exec params: diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 47482dd239..3fb3beebdb 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -370,37 +370,6 @@ functions: binary: bash args: - ${PROJECT_DIRECTORY}/.evergreen/run-typescript.sh - compile mongosh: - - command: subprocess.exec - params: - 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 reset aws instance profile: - command: shell.exec params: @@ -3843,96 +3812,6 @@ tasks: - func: bootstrap mongo-orchestration - func: bootstrap kms servers - func: run tests - - name: run-mongosh-browser-runtime-electron - tags: - - run-mongosh-integration-tests - depends_on: compile-mongosh - commands: - - func: install dependencies - vars: - NODE_LTS_VERSION: 16 - NPM_VERSION: 9 - - 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_VERSION: 16 - NPM_VERSION: 9 - - 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_VERSION: 16 - NPM_VERSION: 9 - - 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_VERSION: 16 - NPM_VERSION: 9 - - 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_VERSION: 16 - NPM_VERSION: 9 - - 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_VERSION: 16 - NPM_VERSION: 9 - - 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_VERSION: 16 - NPM_VERSION: 9 - - func: compile mongosh - - name: verify-mongosh-scopes - tags: - - run-mongosh-integration-tests - commands: - - func: install dependencies - vars: - NODE_LTS_VERSION: 16 - NPM_VERSION: 9 - - func: run mongosh package scope test task_groups: - name: serverless_task_group setup_group_can_fail_task: true @@ -4515,18 +4394,6 @@ buildvariants: run_on: rhel80-large tasks: - download-and-merge-coverage - - name: mongosh_integration_tests - display_name: mongosh integration tests - run_on: ubuntu1804-large - tasks: - - 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 diff --git a/.evergreen/generate_evergreen_tasks.js b/.evergreen/generate_evergreen_tasks.js index e38eb4a5ec..f452d3653d 100644 --- a/.evergreen/generate_evergreen_tasks.js +++ b/.evergreen/generate_evergreen_tasks.js @@ -1,7 +1,6 @@ const fs = require('fs'); const yaml = require('js-yaml'); const semver = require('semver'); -const { mongoshTasks } = require('./generate_mongosh_tasks'); const { MONGODB_VERSIONS, @@ -489,22 +488,24 @@ BUILD_VARIANTS.push({ tasks: ['test-rapid-server'] }); -const unitTestTasks = Array.from((function* () { - for (const { versionNumber: NODE_LTS_VERSION, npmVersion: NPM_VERSION } of versions) { - yield { - name: `run-unit-tests-node-${NODE_LTS_VERSION}`, - tags: ['unit-tests'], - commands: [ - updateExpansions({ - NODE_LTS_VERSION, - NPM_VERSION - }), - { func: 'install dependencies' }, - { func: 'run unit tests' } - ] +const unitTestTasks = Array.from( + (function* () { + for (const { versionNumber: NODE_LTS_VERSION, npmVersion: NPM_VERSION } of versions) { + yield { + name: `run-unit-tests-node-${NODE_LTS_VERSION}`, + tags: ['unit-tests'], + commands: [ + updateExpansions({ + NODE_LTS_VERSION, + NPM_VERSION + }), + { func: 'install dependencies' }, + { func: 'run unit tests' } + ] + }; } - } -})()) + })() +); // singleton build variant for linting SINGLETON_TASKS.push( @@ -577,11 +578,7 @@ BUILD_VARIANTS.push({ name: 'lint', display_name: 'lint', run_on: DEFAULT_OS, - tasks: [ - '.unit-tests', - '.lint-checks', - '.typescript-compilation' - ] + tasks: ['.unit-tests', '.lint-checks', '.typescript-compilation'] }); BUILD_VARIANTS.push({ @@ -591,13 +588,6 @@ BUILD_VARIANTS.push({ tasks: ['download-and-merge-coverage'] }); -BUILD_VARIANTS.push({ - name: 'mongosh_integration_tests', - display_name: 'mongosh integration tests', - run_on: UBUNTU_OS, - tasks: mongoshTasks.map(({ name }) => name) -}); - // special case for MONGODB-AWS authentication BUILD_VARIANTS.push({ name: 'ubuntu1804-test-mongodb-aws', @@ -770,8 +760,7 @@ fileData.tasks = (fileData.tasks || []) .concat(SINGLETON_TASKS) .concat(AUTH_DISABLED_TASKS) .concat(AWS_LAMBDA_HANDLER_TASKS) - .concat(MONGOCRYPTD_CSFLE_TASKS) - .concat(mongoshTasks); + .concat(MONGOCRYPTD_CSFLE_TASKS); fileData.buildvariants = (fileData.buildvariants || []).concat(BUILD_VARIANTS); diff --git a/.evergreen/generate_mongosh_tasks.js b/.evergreen/generate_mongosh_tasks.js deleted file mode 100644 index e94f81a970..0000000000 --- a/.evergreen/generate_mongosh_tasks.js +++ /dev/null @@ -1,67 +0,0 @@ -const scopes = [ - 'browser-runtime-electron', - 'cli-repl', - 'connectivity-tests', - 'mongosh', - 'node-runtime-worker-thread', - 'service-provider-server' -]; - -const mongoshTestTasks = scopes.map(packageName => { - return { - name: `run-mongosh-${packageName}`, - tags: ['run-mongosh-integration-tests'], - depends_on: 'compile-mongosh', - commands: [ - { - func: 'install dependencies', - vars: { - NODE_LTS_VERSION: 16, - NPM_VERSION: 9 - } - }, - { - func: 'run mongosh tests for package', - vars: { - mongosh_package: packageName - } - } - ] - }; -}); - -const compileTask = { - name: `compile-mongosh`, - tags: ['run-mongosh-integration-tests'], - commands: [ - { - func: 'install dependencies', - vars: { - NODE_LTS_VERSION: 16, - NPM_VERSION: 9 - } - }, - { func: 'compile mongosh' } - ] -}; - -const scopeVerificationTask = { - name: `verify-mongosh-scopes`, - tags: ['run-mongosh-integration-tests'], - commands: [ - { - func: 'install dependencies', - vars: { - NODE_LTS_VERSION: 16, - NPM_VERSION: 9 - } - }, - { func: 'run mongosh package scope test' } - ] -}; - -const tasks = [...mongoshTestTasks, compileTask, scopeVerificationTask]; - -module.exports = { - mongoshTasks: tasks -};