Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(NODE-6678): Re-enable Node latest testing #4393

Merged
merged 5 commits into from
Feb 12, 2025
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
1 change: 0 additions & 1 deletion .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4468,7 +4468,6 @@ buildvariants:
- test-tls-support-5.0
- test-tls-support-4.4
- test-tls-support-4.2
disable: true
- name: windows-vsCurrent-large-gallium
display_name: Windows Node16
run_on: windows-vsCurrent-large
Expand Down
2 changes: 0 additions & 2 deletions .evergreen/generate_evergreen_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,6 @@ for (const {
run_on,
expansions: { NODE_LTS_VERSION: 'latest' },
tasks: tasks.map(({ name }) => name),
// TODO(NODE-6641): Unskip the smoke tests
disable: true
};
if (clientEncryption) {
buildVariantData.expansions.CLIENT_ENCRYPTION = true;
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/run-azure-kms-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ export MONGODB_URI="mongodb://localhost:27017"
export EXPECTED_AZUREKMS_OUTCOME=${EXPECTED_AZUREKMS_OUTCOME:-omitted}
export TEST_CSFLE=true

npx mocha --config test/mocha_mongodb.json test/integration/client-side-encryption/client_side_encryption.prose.19.on_demand_azure.test.ts
npx mocha --config test/mocha_mongodb.js test/integration/client-side-encryption/client_side_encryption.prose.19.on_demand_azure.test.ts
2 changes: 1 addition & 1 deletion .evergreen/run-gcp-kms-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ export MONGODB_URI="mongodb://localhost:27017"
export EXPECTED_GCPKMS_OUTCOME=${EXPECTED_GCPKMS_OUTCOME:-omitted}
export TEST_CSFLE=true

npx mocha --config test/mocha_mongodb.json test/integration/client-side-encryption/client_side_encryption.prose.17.on_demand_gcp.test.ts
npx mocha --config test/mocha_mongodb.js test/integration/client-side-encryption/client_side_encryption.prose.17.on_demand_gcp.test.ts
2 changes: 1 addition & 1 deletion .evergreen/run-serverless-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [ -z ${SERVERLESS_ATLAS_USER+omitted} ]; then echo "SERVERLESS_ATLAS_USER is
if [ -z ${SERVERLESS_ATLAS_PASSWORD+omitted} ]; then echo "SERVERLESS_ATLAS_PASSWORD is unset" && exit 1; fi

npx mocha \
--config test/mocha_mongodb.json \
--config test/mocha_mongodb.js \
test/integration/crud/crud.spec.test.ts \
test/integration/crud/crud.prose.test.ts \
test/integration/retryable-reads/retryable_reads.spec.test.ts \
Expand Down
21 changes: 21 additions & 0 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use strict';

const [major] = process.versions.node.split('.');

/** @type {import("mocha").MochaOptions} */
module.exports = {
require: [
'source-map-support/register',
'ts-node/register',
'test/tools/runner/chai_addons.ts',
'test/tools/runner/ee_checker.ts'
],
extension: ['js', 'ts'],
recursive: true,
timeout: 60000,
failZero: true,
reporter: 'test/tools/reporter/mongodb_reporter.js',
sort: true,
color: true,
'node-option': Number(major) >= 23 ? ['no-experimental-strip-types'] : undefined
};
19 changes: 0 additions & 19 deletions .mocharc.json

This file was deleted.

38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,32 +132,32 @@
"check:bench": "npm --prefix test/benchmarks/driver_bench start",
"check:coverage": "nyc npm run test:all",
"check:integration-coverage": "nyc npm run check:test",
"check:lambda": "mocha --config test/mocha_lambda.json test/integration/node-specific/examples/handler.test.js",
"check:lambda:aws": "mocha --config test/mocha_lambda.json test/integration/node-specific/examples/aws_handler.test.js",
"check:lambda": "mocha --config test/mocha_lambda.js test/integration/node-specific/examples/handler.test.js",
"check:lambda:aws": "mocha --config test/mocha_lambda.js test/integration/node-specific/examples/aws_handler.test.js",
"check:lint": "npm run build:dts && npm run check:dts && npm run check:eslint && npm run check:tsd",
"check:eslint": "npm run build:dts && ESLINT_USE_FLAT_CONFIG=false eslint -v && ESLINT_USE_FLAT_CONFIG=false eslint --max-warnings=0 --ext '.js,.ts' src test",
"check:tsd": "tsd --version && tsd",
"check:dependencies": "mocha test/action/dependency.test.ts",
"check:dts": "node ./node_modules/typescript/bin/tsc --noEmit mongodb.d.ts && tsd",
"check:search-indexes": "nyc mocha --config test/mocha_mongodb.json test/manual/search-index-management.prose.test.ts",
"check:test": "mocha --config test/mocha_mongodb.json test/integration",
"check:search-indexes": "nyc mocha --config test/mocha_mongodb.js test/manual/search-index-management.prose.test.ts",
"check:test": "mocha --config test/mocha_mongodb.js test/integration",
"check:unit": "mocha test/unit",
"check:ts": "node ./node_modules/typescript/bin/tsc -v && node ./node_modules/typescript/bin/tsc --noEmit",
"check:atlas": "mocha --config test/manual/mocharc.json test/manual/atlas_connectivity.test.ts",
"check:resource-management": "mocha --config test/manual/mocharc.json test/manual/resource_management.test.ts",
"check:drivers-atlas-testing": "mocha --config test/mocha_mongodb.json test/atlas/drivers_atlas_testing.test.ts",
"check:adl": "mocha --config test/mocha_mongodb.json test/manual/atlas-data-lake-testing",
"check:aws": "nyc mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_aws.test.ts",
"check:oidc-auth": "mocha --config test/mocha_mongodb.json test/integration/auth/auth.spec.test.ts",
"check:oidc-test": "mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_oidc.prose.test.ts",
"check:oidc-azure": "mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_oidc_azure.prose.05.test.ts",
"check:oidc-gcp": "mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_oidc_gcp.prose.06.test.ts",
"check:oidc-k8s": "mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_oidc_k8s.prose.07.test.ts",
"check:kerberos": "nyc mocha --config test/manual/mocharc.json test/manual/kerberos.test.ts",
"check:tls": "mocha --config test/manual/mocharc.json test/manual/tls_support.test.ts",
"check:ldap": "nyc mocha --config test/manual/mocharc.json test/manual/ldap.test.ts",
"check:socks5": "mocha --config test/manual/mocharc.json test/manual/socks5.test.ts",
"check:csfle": "mocha --config test/mocha_mongodb.json test/integration/client-side-encryption",
"check:atlas": "mocha --config test/manual/mocharc.js test/manual/atlas_connectivity.test.ts",
"check:resource-management": "mocha --config test/manual/mocharc.js test/manual/resource_management.test.ts",
"check:drivers-atlas-testing": "mocha --config test/mocha_mongodb.js test/atlas/drivers_atlas_testing.test.ts",
"check:adl": "mocha --config test/mocha_mongodb.js test/manual/atlas-data-lake-testing",
"check:aws": "nyc mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_aws.test.ts",
"check:oidc-auth": "mocha --config test/mocha_mongodb.js test/integration/auth/auth.spec.test.ts",
"check:oidc-test": "mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc.prose.test.ts",
"check:oidc-azure": "mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc_azure.prose.05.test.ts",
"check:oidc-gcp": "mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc_gcp.prose.06.test.ts",
"check:oidc-k8s": "mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc_k8s.prose.07.test.ts",
"check:kerberos": "nyc mocha --config test/manual/mocharc.js test/manual/kerberos.test.ts",
"check:tls": "mocha --config test/manual/mocharc.js test/manual/tls_support.test.ts",
"check:ldap": "nyc mocha --config test/manual/mocharc.js test/manual/ldap.test.ts",
"check:socks5": "mocha --config test/manual/mocharc.js test/manual/socks5.test.ts",
"check:csfle": "mocha --config test/mocha_mongodb.js test/integration/client-side-encryption",
"check:snappy": "mocha test/unit/assorted/snappy.test.js",
"check:x509": "mocha test/manual/x509_auth.test.ts",
"fix:eslint": "npm run check:eslint -- --fix",
Expand Down
13 changes: 13 additions & 0 deletions test/manual/mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use strict';

const [major] = process.versions.node.split('.');

/** @type {import("mocha").MochaOptions} */
module.exports = {
require: ['ts-node/register', 'test/tools/runner/chai_addons.ts'],
reporter: 'test/tools/reporter/mongodb_reporter.js',
failZero: true,
color: true,
timeout: 10000,
'node-option': Number(major) >= 23 ? ['no-experimental-strip-types'] : undefined
};
10 changes: 0 additions & 10 deletions test/manual/mocharc.json

This file was deleted.

17 changes: 17 additions & 0 deletions test/mocha_lambda.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use strict';

const [major] = process.versions.node.split('.');

/** @type {import("mocha").MochaOptions} */
module.exports = {
require: ['test/integration/node-specific/examples/setup.js'],
extension: ['js'],
ui: 'test/tools/runner/metadata_ui.js',
recursive: true,
timeout: 6000,
failZero: true,
reporter: 'test/tools/reporter/mongodb_reporter.js',
sort: true,
color: true,
'node-option': Number(major) >= 23 ? ['no-experimental-strip-types'] : undefined
};
14 changes: 0 additions & 14 deletions test/mocha_lambda.json

This file was deleted.

32 changes: 32 additions & 0 deletions test/mocha_mongodb.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
'use strict';

const [major] = process.versions.node.split('.');

/** @type {import("mocha").MochaOptions} */
module.exports = {
require: [
'source-map-support/register',
'ts-node/register',
'test/tools/runner/chai_addons.ts',
'test/tools/runner/ee_checker.ts',
'test/tools/runner/hooks/configuration.ts',
'test/tools/runner/hooks/leak_checker.ts',
'test/tools/runner/hooks/legacy_crud_shims.ts'
],
extension: ['js', 'ts'],
ui: 'test/tools/runner/metadata_ui.js',
recursive: true,
timeout: 60000,
failZero: true,
reporter: 'test/tools/reporter/mongodb_reporter.js',
sort: true,
color: true,
ignore: [
'test/integration/node-specific/examples/handler.js',
'test/integration/node-specific/examples/handler.test.js',
'test/integration/node-specific/examples/aws_handler.js',
'test/integration/node-specific/examples/aws_handler.test.js',
'test/integration/node-specific/examples/setup.js'
],
'node-option': Number(major) >= 23 ? ['no-experimental-strip-types'] : undefined
};
30 changes: 0 additions & 30 deletions test/mocha_mongodb.json

This file was deleted.