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
148 changes: 118 additions & 30 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ functions:

###
# ARTIFACT COMPILATION
#
#
# compile_artifact generates the executable binary and uploads it as TGZ to S3 for later use.
# Use download_compiled_artifact to download the TGZ from S3.
#
Expand Down Expand Up @@ -142,7 +142,7 @@ functions:

###
# E2E TEST EXECUTION
#
#
# Runs the E2E tests against the compiled artifact, i.e. expects the compiled artifact to be already present.
###
run_e2e_tests:
Expand All @@ -163,13 +163,13 @@ functions:
# package_and_upload_artifact generates a distributable package out of the compiled artifact,
# i.e. it expects it to have been downloaded already. The distributable package will be uploaded
# to a specifc Evergreen S3 bucket for later use.
#
#
# The URL to download the distributable package can be retrieved by get_artifact_url.
#
# package_and_upload_artifact expects the following arguments:
# - distro_id
# - distribution_build_variant
#
#
# get_artifact_url expects the following arguments:
# - distribution_build_variant
###
Expand Down Expand Up @@ -356,8 +356,21 @@ tasks:

###
# UNIT TESTS
# E.g. test_m40xc_n12 stands for mongod 4.0.x, community edition, Node.js 12
###
- name: test_m40x_n12
- name: test_m40xc_n12
tags: ["unit-test"]
commands:
- func: checkout
- func: install
vars:
node_js_version: "12.20.0"
- func: test
vars:
mongosh_server_test_version: "4.0.x-community"
node_js_version: "12.20.0"
mongosh_skip_node_version_check: "1"
- name: test_m40xe_n12
tags: ["unit-test"]
commands:
- func: checkout
Expand All @@ -369,7 +382,19 @@ tasks:
mongosh_server_test_version: "4.0.x"
node_js_version: "12.20.0"
mongosh_skip_node_version_check: "1"
- name: test_m42x_n12
- name: test_m42xc_n12
tags: ["unit-test"]
commands:
- func: checkout
- func: install
vars:
node_js_version: "12.20.0"
- func: test
vars:
mongosh_server_test_version: "4.2.x-community"
node_js_version: "12.20.0"
mongosh_skip_node_version_check: "1"
- name: test_m42xe_n12
tags: ["unit-test"]
commands:
- func: checkout
Expand All @@ -381,7 +406,19 @@ tasks:
mongosh_server_test_version: "4.2.x"
node_js_version: "12.20.0"
mongosh_skip_node_version_check: "1"
- name: test_m44x_n12
- name: test_m44xc_n12
tags: ["unit-test"]
commands:
- func: checkout
- func: install
vars:
node_js_version: "12.20.0"
- func: test
vars:
mongosh_server_test_version: "4.4.x-community"
node_js_version: "12.20.0"
mongosh_skip_node_version_check: "1"
- name: test_m44xe_n12
tags: ["unit-test"]
commands:
- func: checkout
Expand All @@ -405,7 +442,18 @@ tasks:
mongosh_server_test_version: "latest-alpha"
node_js_version: "12.20.0"
mongosh_skip_node_version_check: "1"
- name: test_m40x_n14
- name: test_m40xc_n14
tags: ["unit-test"]
commands:
- func: checkout
- func: install
vars:
node_js_version: "14.15.1"
- func: test
vars:
mongosh_server_test_version: "4.0.x-community"
node_js_version: "14.15.1"
- name: test_m40xe_n14
tags: ["unit-test"]
commands:
- func: checkout
Expand All @@ -416,7 +464,18 @@ tasks:
vars:
mongosh_server_test_version: "4.0.x"
node_js_version: "14.15.1"
- name: test_m42x_n14
- name: test_m42xc_n14
tags: ["unit-test"]
commands:
- func: checkout
- func: install
vars:
node_js_version: "14.15.1"
- func: test
vars:
mongosh_server_test_version: "4.2.x-community"
node_js_version: "14.15.1"
- name: test_m42xe_n14
tags: ["unit-test"]
commands:
- func: checkout
Expand All @@ -427,7 +486,18 @@ tasks:
vars:
mongosh_server_test_version: "4.2.x"
node_js_version: "14.15.1"
- name: test_m44x_n14
- name: test_m44xc_n14
tags: ["unit-test"]
commands:
- func: checkout
- func: install
vars:
node_js_version: "14.15.1"
- func: test
vars:
mongosh_server_test_version: "4.4.x-community"
node_js_version: "14.15.1"
- name: test_m44xe_n14
tags: ["unit-test"]
commands:
- func: checkout
Expand Down Expand Up @@ -636,7 +706,7 @@ tasks:
vars:
node_js_version: "14.15.1"
distribution_build_variant: win32msi

###
# SMOKE TESTS
###
Expand Down Expand Up @@ -767,7 +837,7 @@ tasks:
source_distribution_build_variant: darwin
- func: write_preload_script
- func: test_artifact_macos

###
# RELEASE TASKS
###
Expand Down Expand Up @@ -816,13 +886,19 @@ buildvariants:
executable_os_id: darwin
tasks:
- name: check
- name: test_m40x_n12
- name: test_m42x_n12
- name: test_m44x_n12
- name: test_m40xc_n12
- name: test_m40xe_n12
- name: test_m42xc_n12
- name: test_m42xe_n12
- name: test_m44xc_n12
- name: test_m44xe_n12
- name: test_mlatest_n12
- name: test_m40x_n14
- name: test_m42x_n14
- name: test_m44x_n14
- name: test_m40xc_n14
- name: test_m40xe_n14
- name: test_m42xc_n14
- name: test_m42xe_n14
- name: test_m44xc_n14
- name: test_m44xe_n14
- name: test_mlatest_n14
- name: compile_artifact
- name: e2e_tests_darwin
Expand All @@ -834,13 +910,19 @@ buildvariants:
executable_os_id: linux
tasks:
- name: check
- name: test_m40x_n12
- name: test_m42x_n12
- name: test_m44x_n12
- name: test_m40xc_n12
- name: test_m40xe_n12
- name: test_m42xc_n12
- name: test_m42xe_n12
- name: test_m44xc_n12
- name: test_m44xe_n12
- name: test_mlatest_n12
- name: test_m40x_n14
- name: test_m42x_n14
- name: test_m44x_n14
- name: test_m40xc_n14
- name: test_m40xe_n14
- name: test_m42xc_n14
- name: test_m42xe_n14
- name: test_m44xc_n14
- name: test_m44xe_n14
- name: test_mlatest_n14
- name: test_vscode
- name: test_connectivity
Expand Down Expand Up @@ -893,13 +975,19 @@ buildvariants:
executable_os_id: win32
tasks:
- name: check
- name: test_m40x_n12
- name: test_m42x_n12
- name: test_m44x_n12
- name: test_m40xc_n12
- name: test_m40xe_n12
- name: test_m42xc_n12
- name: test_m42xe_n12
- name: test_m44xc_n12
- name: test_m44xe_n12
- name: test_mlatest_n12
- name: test_m40x_n14
- name: test_m42x_n14
- name: test_m44x_n14
- name: test_m40xc_n14
- name: test_m40xe_n14
- name: test_m42xc_n14
- name: test_m42xe_n14
- name: test_m44xc_n14
- name: test_m44xe_n14
- name: test_mlatest_n14
- name: e2e_tests_win
- name: package_and_upload_artifact_win
Expand Down
11 changes: 10 additions & 1 deletion packages/build/src/download-mongodb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ export async function downloadMongoDb(tmpdir: string, targetVersionSemverSpecifi
return await doDownload(tmpdir, 'latest-alpha', () => lookupAlphaDownloadUrl());
}

let wantsEnterprise = true;
if (/-community$/.test(targetVersionSemverSpecifier)) {
wantsEnterprise = false;
targetVersionSemverSpecifier = targetVersionSemverSpecifier.replace(/-community$/, '');
}

let fullJson: FullJSON;
const fullJSONCachePath = path.resolve(tmpdir, 'full.json.gz');
try {
Expand All @@ -130,7 +136,10 @@ export async function downloadMongoDb(tmpdir: string, targetVersionSemverSpecifi
.filter((info: VersionInfo) => semver.satisfies(info.version, targetVersionSemverSpecifier))
.sort((a: VersionInfo, b: VersionInfo) => semver.rcompare(a.version, b.version));
const versionInfo: VersionInfo = productionVersions[0];
return await doDownload(tmpdir, versionInfo.version, () => lookupDownloadUrl(versionInfo, true));
return await doDownload(
tmpdir,
versionInfo.version + (wantsEnterprise ? '-enterprise' : '-community'),
() => lookupDownloadUrl(versionInfo, wantsEnterprise));
}

const downloadPromises: Record<string, Promise<string>> = {};
Expand Down
5 changes: 3 additions & 2 deletions packages/cli-repl/src/smoke-tests-fle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ try {
} catch(err) {
console.log(err);
}
if (db.version().startsWith('4.0.')) {
// No FLE on mongod < 4.2
if (db.version().startsWith('4.0.') ||
!db.runCommand({buildInfo:1}).modules.includes('enterprise')) {
// No FLE on mongod < 4.2 or community
print('Test skipped')
process.exit(0)
}
Expand Down
3 changes: 2 additions & 1 deletion packages/cli-repl/test/e2e-fle.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from 'chai';
import { MongoClient } from 'mongodb';
import { TestShell } from './test-shell';
import { startTestServer, useBinaryPath, skipIfServerVersion } from '../../../testing/integration-testing-hooks';
import { startTestServer, useBinaryPath, skipIfServerVersion, skipIfCommunityServer } from '../../../testing/integration-testing-hooks';
import { makeFakeHTTPServer, fakeAWSHandlers } from '../../../testing/fake-kms';
import { once } from 'events';
import { serialize } from 'v8';
Expand All @@ -11,6 +11,7 @@ import path from 'path';
describe('FLE tests', () => {
const testServer = startTestServer('shared');
skipIfServerVersion(testServer, '< 4.2'); // FLE only available on 4.2+
skipIfCommunityServer(testServer); // FLE is enterprise-only
useBinaryPath(testServer); // Get mongocryptd in the PATH for this test
let kmsServer: ReturnType<typeof makeFakeHTTPServer>;
let dbname: string;
Expand Down
Loading