Skip to content

Commit 29d7b7b

Browse files
committed
Merge branch 'main' into 1.31-releases
2 parents 7fd8c74 + 8e81190 commit 29d7b7b

File tree

163 files changed

+9056
-2562
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+9056
-2562
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
**/node_modules
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# "bullseye" is the debian distribution that
2+
# ubuntu:20.04 is based on
3+
FROM node:14-bullseye
4+
5+
COPY .evergreen/connectivity-tests/krb5.conf /etc/krb5.conf
6+
7+
RUN apt-get update -y && \
8+
apt-get install -y \
9+
krb5-user \
10+
libsasl2-modules-gssapi-mit \
11+
ldap-utils \
12+
libkrb5-dev \
13+
libsecret-1-dev \
14+
net-tools \
15+
libstdc++6 \
16+
gnome-keyring
17+
18+
ENV COMPASS_RUN_DOCKER_TESTS="true"
19+
20+
COPY . /compass-monorepo-root
21+
WORKDIR /compass-monorepo-root
22+
23+
RUN npm i -g npm@8
24+
RUN npm run bootstrap-ci
25+
26+
CMD ["bash", ".evergreen/connectivity-tests/entrypoint.sh"]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
echo "---- HOSTS: ----"
5+
cat /etc/hosts
6+
echo "----------------"
7+
8+
echo "running kinit"
9+
echo 'password' | kinit [email protected]
10+
echo
11+
echo "klist:"
12+
klist
13+
echo
14+
15+
echo "Running 'npm run test-connectivity --workspace mongodb-data-service' in ${PWD}"
16+
npm run test-connectivity --workspace mongodb-data-service
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[libdefaults]
2+
default_realm = EXAMPLE.COM
3+
dns_canonicalize_hostname = false
4+
5+
[realms]
6+
EXAMPLE.COM = {
7+
kdc = localhost
8+
admin_server = localhost
9+
}
10+
11+
EXAMPLE2.COM = {
12+
kdc = localhost:89
13+
admin_server = localhost:849
14+
}
15+
16+
[domain_realm]
17+
.examplecrossrealm.com = EXAMPLE2.COM
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
3+
# NOTE: do not -x here there are "env" vars in the commands
4+
set -e
5+
6+
MONOREPO_ROOT_DIR="$(cd $(dirname "$0")/../..; pwd)"
7+
cd $MONOREPO_ROOT_DIR
8+
9+
echo "building connectivity tests image from ${PWD}"
10+
docker build -t devtools-connectivity-tests -f "./.evergreen/connectivity-tests/Dockerfile" .
11+
echo "connectivity tests image built"
12+
13+
echo running connectivity tests image
14+
15+
docker run \
16+
--rm \
17+
-e E2E_TESTS_ATLAS_HOST="${E2E_TESTS_ATLAS_HOST}" \
18+
-e E2E_TESTS_DATA_LAKE_HOST="${E2E_TESTS_DATA_LAKE_HOST}" \
19+
-e E2E_TESTS_ANALYTICS_NODE_HOST="${E2E_TESTS_ANALYTICS_NODE_HOST}" \
20+
-e E2E_TESTS_SERVERLESS_HOST="${E2E_TESTS_SERVERLESS_HOST}" \
21+
-e E2E_TESTS_FREE_TIER_HOST="${E2E_TESTS_FREE_TIER_HOST}" \
22+
-e E2E_TESTS_ATLAS_USERNAME="${E2E_TESTS_ATLAS_USERNAME}" \
23+
-e E2E_TESTS_ATLAS_PASSWORD="${E2E_TESTS_ATLAS_PASSWORD}" \
24+
-e E2E_TESTS_ATLAS_X509_PEM="${E2E_TESTS_ATLAS_X509_PEM}" \
25+
-e MONGODB_VERSION="${MONGODB_VERSION}" \
26+
--add-host mongodb-kerberos-1.example.com:0.0.0.0 \
27+
--add-host mongodb-kerberos-2.example.com:0.0.0.0 \
28+
--add-host mongodb-kerberos-3.examplecrossrealm.com:0.0.0.0 \
29+
--network host \
30+
devtools-connectivity-tests
31+

.evergreen/functions.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,16 @@ post:
8181
params:
8282
local_files_include_filter:
8383
- src/packages/compass-e2e-tests/.log/**/*
84-
- <<: *save-diagnostic-file
85-
params:
86-
local_files_include_filter:
8784
- src/packages/compass-e2e-tests/.nyc_output/coverage.json
88-
- <<: *save-diagnostic-file
89-
params:
90-
local_files_include_filter:
85+
- src/packages/compass-e2e-tests/.log/report.json
9186
- ~/.mongodb/runner/*.log
92-
- command: attach.results
93-
params:
94-
file_location: src/packages/compass-e2e-tests/.log/report.json
9587

9688
functions:
89+
clone:
90+
- command: git.get_project
91+
params:
92+
directory: src
93+
9794
prepare:
9895
- command: git.get_project
9996
params:
@@ -383,7 +380,7 @@ functions:
383380
# Load environment variables
384381
eval $(.evergreen/print-compass-env.sh)
385382
source .evergreen/start-docker-envs.sh
386-
npm run test-connectivity --workspace mongodb-data-service
383+
bash .evergreen/connectivity-tests/run.sh
387384
388385
test-csfle:
389386
- command: shell.exec

.evergreen/tasks.in.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,9 @@ tasks:
124124
variants: [ubuntu]
125125

126126
- name: test-connectivity
127-
tags: ['required-for-publish']
127+
tags: ['required-for-publish', 'run-on-pr']
128128
commands:
129-
- func: prepare
130-
- func: install
131-
- func: bootstrap
129+
- func: clone
132130
- func: test-connectivity
133131
vars:
134132
debug: 'compass*,electron*,hadron*,mongo*'

.evergreen/tasks.yml

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,9 @@ tasks:
124124
variants: [ubuntu]
125125

126126
- name: test-connectivity
127-
tags: ['required-for-publish']
127+
tags: ['required-for-publish', 'run-on-pr']
128128
commands:
129-
- func: prepare
130-
- func: install
131-
- func: bootstrap
129+
- func: clone
132130
- func: test-connectivity
133131
vars:
134132
debug: 'compass*,electron*,hadron*,mongo*'
@@ -277,7 +275,7 @@ tasks:
277275
target_platform: '--platform=darwin'
278276

279277
# copied as test-packaged-app-macos due to depends_on variation
280-
278+
281279

282280
- name: test-packaged-app-40x-community
283281
tags: ['required-for-publish', 'run-on-pr']
@@ -296,11 +294,11 @@ tasks:
296294
vars:
297295
compass_distribution: compass
298296
- func: test-packaged-app
299-
vars:
297+
vars:
300298
mongodb_version: 4.0.x
301299
compass_distribution: compass
302300
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
303-
301+
304302

305303
- name: test-packaged-app-40x-enterprise
306304
tags: ['required-for-publish', 'run-on-pr']
@@ -319,12 +317,12 @@ tasks:
319317
vars:
320318
compass_distribution: compass
321319
- func: test-packaged-app
322-
vars:
320+
vars:
323321
mongodb_version: 4.0.x
324322
mongodb_use_enterprise: yes
325323
compass_distribution: compass
326324
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
327-
325+
328326

329327
- name: test-packaged-app-42x-community
330328
tags: ['required-for-publish', 'run-on-pr']
@@ -343,11 +341,11 @@ tasks:
343341
vars:
344342
compass_distribution: compass
345343
- func: test-packaged-app
346-
vars:
344+
vars:
347345
mongodb_version: 4.2.x
348346
compass_distribution: compass
349347
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
350-
348+
351349

352350
- name: test-packaged-app-42x-enterprise
353351
tags: ['required-for-publish', 'run-on-pr']
@@ -366,12 +364,12 @@ tasks:
366364
vars:
367365
compass_distribution: compass
368366
- func: test-packaged-app
369-
vars:
367+
vars:
370368
mongodb_version: 4.2.x
371369
mongodb_use_enterprise: yes
372370
compass_distribution: compass
373371
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
374-
372+
375373

376374
- name: test-packaged-app-44x-community
377375
tags: ['required-for-publish', 'run-on-pr']
@@ -390,11 +388,11 @@ tasks:
390388
vars:
391389
compass_distribution: compass
392390
- func: test-packaged-app
393-
vars:
391+
vars:
394392
mongodb_version: 4.4.x
395393
compass_distribution: compass
396394
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
397-
395+
398396

399397
- name: test-packaged-app-44x-enterprise
400398
tags: ['required-for-publish', 'run-on-pr']
@@ -413,12 +411,12 @@ tasks:
413411
vars:
414412
compass_distribution: compass
415413
- func: test-packaged-app
416-
vars:
414+
vars:
417415
mongodb_version: 4.4.x
418416
mongodb_use_enterprise: yes
419417
compass_distribution: compass
420418
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
421-
419+
422420

423421
- name: test-packaged-app-5x-community
424422
tags: ['required-for-publish', 'run-on-pr']
@@ -437,11 +435,11 @@ tasks:
437435
vars:
438436
compass_distribution: compass
439437
- func: test-packaged-app
440-
vars:
438+
vars:
441439
mongodb_version: 5.x.x
442440
compass_distribution: compass
443441
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
444-
442+
445443

446444
- name: test-packaged-app-5x-enterprise
447445
tags: ['required-for-publish', 'run-on-pr']
@@ -460,9 +458,9 @@ tasks:
460458
vars:
461459
compass_distribution: compass
462460
- func: test-packaged-app
463-
vars:
461+
vars:
464462
mongodb_version: 5.x.x
465463
mongodb_use_enterprise: yes
466464
compass_distribution: compass
467465
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
468-
466+

.github/workflows/connectivity-tests.yaml

Lines changed: 0 additions & 114 deletions
This file was deleted.

0 commit comments

Comments
 (0)