Skip to content

Commit 7bda294

Browse files
committed
Fixes
1 parent b395f01 commit 7bda294

File tree

5 files changed

+70
-9
lines changed

5 files changed

+70
-9
lines changed

.evergreen/config.yml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,14 @@ functions:
288288
- .evergreen/scripts/run-doctests.sh
289289

290290
"run tests":
291+
- command: subprocess.exec
292+
params:
293+
working_dir: "src"
294+
binary: bash
295+
background: true
296+
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
297+
args:
298+
- .evergreen/scripts/setup-encryption.sh
291299
- command: subprocess.exec
292300
params:
293301
working_dir: "src"
@@ -314,6 +322,7 @@ functions:
314322
include_expansions_in_env: ["PYTHON_BINARY", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
315323
working_dir: "src"
316324
args:
325+
- .evergreen/scripts/run-with-env.sh
317326
- .evergreen/scripts/run-atlas-tests.sh
318327

319328
"get aws auth secrets":
@@ -344,7 +353,8 @@ functions:
344353
binary: bash
345354
working_dir: "src"
346355
args:
347-
- .evergreen/scripts/run-mongodb-aws-test.sh assume-role
356+
- .evergreen/scripts/run-mongodb-aws-test.sh
357+
- assume-role
348358

349359
"run aws auth test with aws EC2 credentials":
350360
- command: subprocess.exec
@@ -354,19 +364,29 @@ functions:
354364
binary: bash
355365
working_dir: "src"
356366
args:
357-
- .evergreen/scripts/run-mongodb-aws-test.sh ec2
367+
- .evergreen/scripts/run-mongodb-aws-test.sh
368+
- ec2
358369

359370
"run aws auth test with aws web identity credentials":
371+
- # Test with and without AWS_ROLE_SESSION_NAME set.
360372
- command: subprocess.exec
361373
type: test
362374
params:
363375
include_expansions_in_env: ["DRIVERS_TOOLS", "skip_EC2_auth_test"]
364376
binary: bash
365377
working_dir: "src"
366378
args:
367-
# Test with and without AWS_ROLE_SESSION_NAME set.
368-
- .evergreen/scripts/run-mongodb-aws-test.sh web-identity
369-
- AWS_ROLE_SESSION_NAME="test" .evergreen/scripts/run-mongodb-aws-test.sh web-identity
379+
- .evergreen/scripts/run-mongodb-aws-test.sh
380+
- web-identity
381+
- command: subprocess.exec
382+
type: test
383+
params:
384+
include_expansions_in_env: [ "DRIVERS_TOOLS", "skip_EC2_auth_test" ]
385+
binary: bash
386+
working_dir: "src"
387+
args:
388+
- AWS_ROLE_SESSION_NAME="test" .evergreen/scripts/run-mongodb-aws-test.sh
389+
- web-identity
370390

371391
"run aws auth test with aws credentials as environment variables":
372392
- command: subprocess.exec
@@ -376,7 +396,8 @@ functions:
376396
binary: bash
377397
working_dir: "src"
378398
args:
379-
- .evergreen/scripts/run-mongodb-aws-test.sh env-creds
399+
- .evergreen/scripts/run-mongodb-aws-test.sh
400+
- env-creds
380401

381402
"run aws auth test with aws credentials and session token as environment variables":
382403
- command: subprocess.exec
@@ -386,7 +407,8 @@ functions:
386407
binary: bash
387408
working_dir: "src"
388409
args:
389-
- .evergreen/scripts/run-mongodb-aws-test.sh session-creds
410+
- .evergreen/scripts/run-mongodb-aws-test.sh
411+
- session-creds
390412

391413
"run oidc auth test with test credentials":
392414
- command: subprocess.exec
@@ -497,7 +519,7 @@ functions:
497519
params:
498520
background: true
499521
binary: bash
500-
include_expansions_in_env: ["SERVER_TYPE", "OCSP_ALGORITHM"]
522+
include_expansions_in_env: [SERVER_TYPE, OCSP_ALGORITHM]
501523
args:
502524
- ${DRIVERS_TOOLS}/.evergreen/ocsp/setup.sh
503525

.evergreen/scripts/configure-env.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,25 @@ export PROJECT_DIRECTORY="$PROJECT_DIRECTORY"
4141
export AUTH="${AUTH:-noauth}"
4242
export SSL="${SSL:-nossl}"
4343
export PYTHON_BINARY="${PYTHON_BINARY:-}"
44+
export test_encryption="${test_encryption:-}"
45+
export test_encryption_pyopenssl="${test_encryption_pyopenssl:-}"
46+
export test_crypt_shared="${test_crypt_shared:-}"
47+
export test_pyopenssl="${test_pyopenssl:-}"
48+
export SETDEFAULTENCODING="${SETDEFAULTENCODING:-}"
49+
export test_loadbalancer="${test_loadbalancer:-}"
50+
export test_serverless="${test_serverless:-}"
51+
export TEST_INDEX_MANAGEMENT="${TEST_INDEX_MANAGEMENT:-}"
52+
export SKIP_CSOT_TESTS="${SKIP_CSOT_TESTS:-}"
53+
export MONGODB_STARTED="${MONGODB_STARTED:-}"
54+
export DISABLE_TEST_COMMANDS="${DISABLE_TEST_COMMANDS:-}"
55+
export GREEN_FRAMEWORK="${GREEN_FRAMEWORK:-}"
56+
export NO_EXT="${NO_EXT:-}"
57+
export COVERAGE="${COVERAGE:-}"
58+
export COMPRESSORS="${COMPRESSORS:-}"
59+
export TEST_DATA_LAKE="${TEST_DATA_LAKE:-}"
60+
export TEST_SUITES="${TEST_SUITES:-}"
61+
export MONGODB_API_VERSION="${MONGODB_API_VERSION:-}"
62+
export SKIP_HATCH="${SKIP_HATCH:-}"
4463
4564
export TMPDIR="$MONGO_ORCHESTRATION_HOME/db"
4665
export PATH="$MONGODB_BINARIES:$PATH"

.evergreen/scripts/run-atlas-tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/bash
22

3-
. .evergreen/scripts/env.sh
43
# Disable xtrace for security reasons (just in case it was accidentally set).
54
set +x
65
set -o errexit

.evergreen/scripts/run-with-env.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash -eu
2+
3+
# Example use: bash run-with-env.sh run-tests.sh {args...}
4+
5+
# Parameter expansion to get just the current directory's name
6+
if [ "${PWD##*/}" == "src" ]; then
7+
. .evergreen/scripts/env.sh
8+
else
9+
. src/.evergreen/scripts/env.sh
10+
fi
11+
12+
# shellcheck source=/dev/null
13+
. "$1" "${@:2}"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -eu
4+
5+
. .evergreen/scripts/env.sh
6+
if [ -n "${test_encryption}" ]; then
7+
./.evergreen/hatch.sh encryption:setup &
8+
fi

0 commit comments

Comments
 (0)