Skip to content

Commit 3c350d1

Browse files
authored
chore(ci): expand test matrix MONGOSH-1140 MONGOSH-1142 MONGOSH-1146 (#1541)
Add docker-based smoke tests for Debian 12 and e2e tests for RHEL9 and Ubuntu 22.04.
1 parent 66b44ad commit 3c350d1

File tree

8 files changed

+588
-19
lines changed

8 files changed

+588
-19
lines changed

.evergreen.yml

Lines changed: 478 additions & 0 deletions
Large diffs are not rendered by default.

.evergreen/evergreen.yml.in

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -861,10 +861,11 @@ tasks:
861861
# E2E TESTS
862862
###
863863
<% for (const { executableOsId, compileBuildVariant } of RELEASE_PACKAGE_MATRIX) {
864-
for (const mVersion of ['stable', '5.0.x']) {
864+
// TODO(MONGOSH-1548): Account for 7.0.0 GA release when it happens
865+
for (const mVersion of ['stable', '5.0.x', '7.0.0-rc10']) {
865866
for (const fipsVariant of ['fips', 'nofips']) {
866867
%>
867-
- name: e2e_tests_<% out(executableOsId.replace(/-/g, '_')) %><% out(mVersion === 'stable' ? '' : '_50x') %><% out(fipsVariant === 'fips' ? '_fips' : '') %>
868+
- name: e2e_tests_<% out(executableOsId.replace(/-/g, '_')) %><% out(mVersion === 'stable' ? '' : '_' + mVersion.replace(/[^a-zA-Z0-9]/g, '')) %><% out(fipsVariant === 'fips' ? '_fips' : '') %>
868869
tags: ["e2e-test"]
869870
depends_on:
870871
- name: compile_artifact
@@ -1144,13 +1145,25 @@ buildvariants:
11441145
run_on: rhel80-small
11451146
tasks:
11461147
- name: e2e_tests_linux_x64
1148+
- name: e2e_rhel90_x64
1149+
display_name: "RHEL 9.0 x64 (E2E Tests)"
1150+
run_on: rhel90-small
1151+
tasks:
1152+
- name: e2e_tests_linux_x64
11471153
- name: e2e_rhel83_x64
11481154
display_name: "RHEL 8.3 x64 (E2E Tests, FIPS-available OS)"
11491155
run_on: rhel83-fips
11501156
tasks:
11511157
- name: e2e_tests_linux_x64
11521158
- name: e2e_tests_linux_x64_openssl11
11531159
- name: e2e_tests_linux_x64_openssl11_fips
1160+
- name: e2e_rhel92_x64
1161+
display_name: "RHEL 9.2 x64 (E2E Tests, FIPS-available OS)"
1162+
run_on: rhel92-fips
1163+
tasks:
1164+
- name: e2e_tests_linux_x64
1165+
- name: e2e_tests_linux_x64_openssl3
1166+
- name: e2e_tests_linux_x64_openssl3_fips
11541167
- name: e2e_ubuntu1804_x64
11551168
display_name: "Ubuntu 18.04 x64 (E2E Tests)"
11561169
run_on: ubuntu1804-small
@@ -1162,6 +1175,12 @@ buildvariants:
11621175
tasks:
11631176
- name: e2e_tests_linux_x64
11641177
- name: e2e_tests_linux_x64_openssl11
1178+
- name: e2e_ubuntu2204_x64
1179+
display_name: "Ubuntu 22.04 x64 (E2E Tests)"
1180+
run_on: ubuntu2204-small
1181+
tasks:
1182+
- name: e2e_tests_linux_x64
1183+
- name: e2e_tests_linux_x64_openssl3
11651184
- name: e2e_debian9_x64
11661185
display_name: "Debian 9 x64 (E2E Tests)"
11671186
run_on: debian92-small
@@ -1189,6 +1208,11 @@ buildvariants:
11891208
run_on: amazon2-small
11901209
tasks:
11911210
- name: e2e_tests_linux_x64
1211+
- name: e2e_amazon2023_x64
1212+
display_name: "Amazon Linux 2023 x64 (E2E Tests)"
1213+
run_on: amazon2023.0-small
1214+
tasks:
1215+
- name: e2e_tests_linux_x64_700rc10
11921216
- name: e2e_suse12_x64
11931217
display_name: "SLES 12 x64 (E2E Tests)"
11941218
run_on: suse12-sp5-small
@@ -1210,16 +1234,31 @@ buildvariants:
12101234
tasks:
12111235
- name: e2e_tests_linux_arm64
12121236
- name: e2e_tests_linux_arm64_openssl11
1237+
- name: e2e_ubuntu2204_arm64
1238+
display_name: "Ubuntu 22.04 arm64 (E2E Tests)"
1239+
run_on: ubuntu2204-arm64-small
1240+
tasks:
1241+
- name: e2e_tests_linux_arm64
12131242
- name: e2e_amazon2_arm64
12141243
display_name: "Amazon Linux 2 arm64 (E2E Tests)"
12151244
run_on: amazon2-arm64-small
12161245
tasks:
12171246
- name: e2e_tests_linux_arm64
1247+
- name: e2e_amazon2023_arm64
1248+
display_name: "Amazon Linux 2023 arm64 (E2E Tests)"
1249+
run_on: amazon2023.0-arm64-small
1250+
tasks:
1251+
- name: e2e_tests_linux_arm64_700rc10
12181252
- name: e2e_rhel82_arm64
12191253
display_name: "RHEL 8.2 arm64 (E2E Tests)"
12201254
run_on: rhel82-arm64-small
12211255
tasks:
12221256
- name: e2e_tests_linux_arm64
1257+
- name: e2e_rhel90_arm64
1258+
display_name: "RHEL 9.0 arm64 (E2E Tests)"
1259+
run_on: rhel90-arm64-small
1260+
tasks:
1261+
- name: e2e_tests_linux_arm64
12231262
- name: e2e_rhel81_ppc64le
12241263
display_name: "RHEL 8.1 PPC (E2E Tests)"
12251264
run_on: rhel81-power8-small

config/release-package-matrix.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ exports.RELEASE_PACKAGE_MATRIX = [
2020
compileBuildVariant: 'linux_x64_build',
2121
packages: [
2222
{ name: 'linux-x64', description: 'Linux Tarball 64-bit', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu20.04-tgz'] },
23-
{ name: 'deb-x64', description: 'Debian / Ubuntu 64-bit', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu18.04-deb', 'ubuntu20.04-deb', 'ubuntu22.04-deb', 'ubuntu22.04-nohome-deb', 'debian9-deb', 'debian10-deb', 'debian11-deb'] },
23+
{ name: 'deb-x64', description: 'Debian / Ubuntu 64-bit', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu18.04-deb', 'ubuntu20.04-deb', 'ubuntu22.04-deb', 'ubuntu22.04-nohome-deb', 'debian9-deb', 'debian10-deb', 'debian11-deb', 'debian12-deb'] },
2424
{ name: 'rpm-x64', description: 'RHEL / CentOS / Fedora / Suse 64-bit', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['centos7-rpm', 'amazonlinux2-rpm', 'amazonlinux2023-rpm', 'rocky8-rpm', 'rocky9-rpm', 'fedora34-rpm', 'suse12-rpm', 'suse15-rpm', 'amazonlinux1-rpm'] }
2525
]
2626
},
@@ -38,7 +38,7 @@ exports.RELEASE_PACKAGE_MATRIX = [
3838
compileBuildVariant: 'linux_x64_build_openssl3',
3939
packages: [
4040
{ name: 'linux-x64-openssl3', description: 'Linux Tarball 64-bit (shared OpenSSL 3)', packageOn: 'linux_package', smokeTestKind: 'none' },
41-
{ name: 'deb-x64-openssl3', description: 'Debian / Ubuntu 64-bit (shared OpenSSL 3)', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu22.04-deb', 'ubuntu22.04-fips-deb'] },
41+
{ name: 'deb-x64-openssl3', description: 'Debian / Ubuntu 64-bit (shared OpenSSL 3)', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu22.04-deb', 'ubuntu22.04-fips-deb', 'debian12-deb'] },
4242
{ name: 'rpm-x64-openssl3', description: 'RHEL / CentOS 64-bit (shared OpenSSL 3)', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['rocky8-epel-rpm', 'rocky9-rpm', 'rocky9-fips-rpm', 'amazonlinux2023-rpm'] }
4343
]
4444
},
@@ -47,7 +47,7 @@ exports.RELEASE_PACKAGE_MATRIX = [
4747
compileBuildVariant: 'linux_arm64_build',
4848
packages: [
4949
{ name: 'linux-arm64', description: 'Linux Tarball arm64', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu20.04-tgz'] },
50-
{ name: 'deb-arm64', description: 'Debian / Ubuntu arm64', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu18.04-deb', 'ubuntu20.04-deb', 'ubuntu22.04-deb', 'debian10-deb', 'debian11-deb'] },
50+
{ name: 'deb-arm64', description: 'Debian / Ubuntu arm64', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['ubuntu18.04-deb', 'ubuntu20.04-deb', 'ubuntu22.04-deb', 'debian10-deb', 'debian11-deb', 'debian12-deb'] },
5151
{ name: 'rpm-arm64', description: 'RHEL / CentOS arm64', packageOn: 'linux_package', smokeTestKind: 'docker', smokeTestDockerfiles: ['rocky8-rpm', 'rocky9-rpm', 'fedora34-rpm', 'amazonlinux2-rpm', 'amazonlinux2023-rpm'] }
5252
]
5353
},

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli-repl/test/e2e-auth.spec.ts

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@ describe('Auth e2e', function () {
149149
await assertUserAuth();
150150
});
151151
it('digestPassword', async function () {
152-
if (process.env.MONGOSH_TEST_E2E_FORCE_FIPS) {
152+
if (
153+
process.env.MONGOSH_TEST_E2E_FORCE_FIPS ||
154+
process.env.DISTRO_ID === 'rhel92-fips'
155+
) {
153156
return this.skip(); // No SCRAM-SHA-1 in FIPS mode
154157
}
155158
await shell.executeLine(`use ${dbName}`);
@@ -212,7 +215,10 @@ describe('Auth e2e', function () {
212215
shell.assertNoErrors();
213216
});
214217
it('digestPassword', async function () {
215-
if (process.env.MONGOSH_TEST_E2E_FORCE_FIPS) {
218+
if (
219+
process.env.MONGOSH_TEST_E2E_FORCE_FIPS ||
220+
process.env.DISTRO_ID === 'rhel92-fips'
221+
) {
216222
return this.skip(); // No SCRAM-SHA-1 in FIPS mode
217223
}
218224
await shell.executeLine(`use ${dbName}`);
@@ -930,7 +936,10 @@ describe('Auth e2e', function () {
930936
});
931937
context('with specific auth mechanisms', function () {
932938
it('can auth with SCRAM-SHA-1', async function () {
933-
if (process.env.MONGOSH_TEST_E2E_FORCE_FIPS) {
939+
if (
940+
process.env.MONGOSH_TEST_E2E_FORCE_FIPS ||
941+
process.env.DISTRO_ID === 'rhel92-fips'
942+
) {
934943
return this.skip(); // No SCRAM-SHA-1 in FIPS mode
935944
}
936945
const connectionString = await testServer.connectionString();
@@ -954,6 +963,29 @@ describe('Auth e2e', function () {
954963
shell.assertNoErrors();
955964
});
956965
it('provides a helpful error message for SCRAM-SHA-1 in FIPS mode', async function () {
966+
{
967+
// This test is not particularly meaningful if we're using the system OpenSSL installation
968+
// and it is not properly configured for FIPS to begin with. This is the case on e.g.
969+
// Ubuntu 22.04 in evergreen CI.
970+
const preTestShell = TestShell.start({
971+
args: [
972+
'--quiet',
973+
'--nodb',
974+
'--tlsFIPSMode',
975+
'--eval',
976+
'tls.createSecureContext()',
977+
],
978+
});
979+
if (
980+
(await preTestShell.waitForExit()) === 1 &&
981+
preTestShell.output.includes(
982+
'digital envelope routines::unsupported'
983+
)
984+
) {
985+
return this.skip();
986+
}
987+
}
988+
957989
const connectionString = await testServer.connectionString();
958990
shell = TestShell.start({
959991
args: [

packages/cli-repl/test/e2e-oidc.spec.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,10 @@ describe('OIDC auth e2e', function () {
235235
await verifyUser(shell, 'testuser', 'testServer-group');
236236
await shell.executeLine('db.getMongo().setReadPref("primaryPreferred");');
237237
await verifyUser(shell, 'testuser', 'testServer-group');
238-
await shell.executeLine(
239-
`db = connect(${JSON.stringify(cs + '/?authMechanism=MONGODB-OIDC')})`
240-
);
238+
const cs2 = await testServer.connectionString({
239+
authMechanism: 'MONGODB-OIDC',
240+
});
241+
await shell.executeLine(`db = connect(${JSON.stringify(cs2)})`);
241242
await verifyUser(shell, 'testuser', 'testServer-group');
242243
shell.assertNoErrors();
243244
expect(tokenFetches).to.equal(1);
@@ -255,8 +256,9 @@ describe('OIDC auth e2e', function () {
255256
await shell.waitForPrompt();
256257

257258
await verifyUser(shell, 'testuser', 'testServer-group');
258-
const cs2 =
259-
(await testServer2.connectionString()) + '/?authMechanism=MONGODB-OIDC';
259+
const cs2 = await testServer2.connectionString({
260+
authMechanism: 'MONGODB-OIDC',
261+
});
260262
await shell.executeLine(`db = connect(${JSON.stringify(cs2)})`);
261263
await verifyUser(shell, 'testuser', 'testServer2-group');
262264
shell.assertNoErrors();

packages/cli-repl/test/e2e-snippet.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ describe('snippet integration tests', function () {
1212
let shell: TestShell;
1313
let makeTestShell: () => TestShell;
1414
beforeEach(async function () {
15+
if (process.env.DISTRO_ID === 'rhel92-fips') {
16+
// TODO: The HTTPS requests we are making for snippet support do not work
17+
// with the FIPS configuration on the RHEL 9.2 FIPS-enabled machines.
18+
return this.skip();
19+
}
20+
1521
makeTestShell = () =>
1622
TestShell.start({
1723
args: ['--nodb'],
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM debian:12
2+
3+
ARG artifact_url=""
4+
ADD ${artifact_url} /tmp
5+
ADD node_modules /usr/share/mongodb-crypt-library-version/node_modules
6+
RUN apt-get update
7+
RUN apt-get install -y man-db
8+
RUN apt-get install -y /tmp/*mongosh*.deb
9+
RUN /usr/bin/mongosh --build-info
10+
RUN env MONGOSH_RUN_NODE_SCRIPT=1 mongosh /usr/share/mongodb-crypt-library-version/node_modules/.bin/mongodb-crypt-library-version /usr/lib/mongosh_crypt_v1.so | grep -Eq '^mongo_(crypt|csfle)_v1-'
11+
RUN man mongosh | grep -q tlsAllowInvalidCertificates
12+
ENTRYPOINT [ "mongosh" ]

0 commit comments

Comments
 (0)