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

PYTHON-4540 Cleaner separation of test lifecycle #2082

Merged
merged 124 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
30a7bda
PYTHON-4540 Cleaner separation of test lifecycle
blink1073 Jan 22, 2025
cfb4deb
update tests
blink1073 Jan 22, 2025
2a6cd2f
fix name
blink1073 Jan 22, 2025
0207bbb
debug
blink1073 Jan 22, 2025
db8a4d3
fixup
blink1073 Jan 22, 2025
044648d
fix usage of TEST_ENTERPRISE_AUTH
blink1073 Jan 22, 2025
bccc0ec
convert to python file
blink1073 Jan 22, 2025
3311320
cleanup
blink1073 Jan 23, 2025
591106d
cleanup
blink1073 Jan 23, 2025
3d0e3c9
fix source_env
blink1073 Jan 23, 2025
4529b6d
cleanup
blink1073 Jan 23, 2025
238a6be
debug
blink1073 Jan 23, 2025
98e79d5
more debug
blink1073 Jan 23, 2025
8301f4d
more debug
blink1073 Jan 23, 2025
212b1a7
more debug
blink1073 Jan 23, 2025
1b272de
more debug
blink1073 Jan 23, 2025
0ba9e2d
more debug
blink1073 Jan 23, 2025
7909a65
more debug
blink1073 Jan 23, 2025
aae0bbc
debug
blink1073 Jan 23, 2025
ead2472
try again
blink1073 Jan 23, 2025
14f99be
try again
blink1073 Jan 23, 2025
7a91355
clean up
blink1073 Jan 23, 2025
258044c
debug
blink1073 Jan 23, 2025
a1973e9
try again
blink1073 Jan 24, 2025
1a57484
remove exit
blink1073 Jan 24, 2025
7fcddce
debug
blink1073 Jan 24, 2025
1fdc10c
fix auth logic
blink1073 Jan 24, 2025
e9aa927
fix auth logic
blink1073 Jan 24, 2025
173ef6c
debug
blink1073 Jan 24, 2025
685a6f6
more debug
blink1073 Jan 24, 2025
fc243dc
Fix newline handling
blink1073 Jan 24, 2025
2405945
cleanup
blink1073 Jan 24, 2025
a277dd9
kms fixes
blink1073 Jan 24, 2025
47f1067
kms fixes
blink1073 Jan 24, 2025
71282de
kms fixes
blink1073 Jan 24, 2025
f778bcd
do not rely on DRIVERS_TOOLS
blink1073 Jan 24, 2025
741a5fa
pass through LIBMONGOCRYPT_URL
blink1073 Jan 24, 2025
cd3476f
pass through LIBMONGOCRYPT_URL
blink1073 Jan 24, 2025
b0ce967
another kms fix
blink1073 Jan 24, 2025
d93f5d1
cleanup
blink1073 Jan 25, 2025
a0e9821
cleanup
blink1073 Jan 25, 2025
93b1875
syntax
blink1073 Jan 25, 2025
3fe03e9
missing default
blink1073 Jan 25, 2025
c2236ef
cleanup
blink1073 Jan 25, 2025
d8ecde9
fix kms logic
blink1073 Jan 26, 2025
b1d8768
fix kms logic
blink1073 Jan 26, 2025
93163a6
debug
blink1073 Jan 26, 2025
da2f507
debug
blink1073 Jan 26, 2025
55f669c
debug
blink1073 Jan 26, 2025
1dbda39
fix is_set
blink1073 Jan 26, 2025
9493ae8
debug
blink1073 Jan 26, 2025
24f3ac4
cleanup
blink1073 Jan 26, 2025
f6ddacf
disable exit
blink1073 Jan 27, 2025
db9a253
disable exit
blink1073 Jan 27, 2025
3d87252
fixups
blink1073 Jan 27, 2025
a5067b9
fixups
blink1073 Jan 27, 2025
9b9b99b
fix index management and debug
blink1073 Jan 27, 2025
b75f007
debug load balancer
blink1073 Jan 27, 2025
058d95c
debug load balancer
blink1073 Jan 27, 2025
6833197
Fix loadbalancer
blink1073 Jan 27, 2025
9f777f5
Merge branch 'master' of github.com:mongodb/mongo-python-driver into …
blink1073 Jan 27, 2025
16b1365
freeze the lock file
blink1073 Jan 27, 2025
ee80b44
shell lint
blink1073 Jan 27, 2025
a496e7d
fix failing tests
blink1073 Jan 27, 2025
8213f2b
fix encryption tests
blink1073 Jan 27, 2025
fc4e7e5
fix for enterprise auth
blink1073 Jan 27, 2025
b2daf64
fix for enterprise auth
blink1073 Jan 27, 2025
56f5c88
fix for enterprise auth
blink1073 Jan 27, 2025
8e59470
fix handling of mongocrypt.dll
blink1073 Jan 28, 2025
56868c5
Merge branch 'master' of github.com:mongodb/mongo-python-driver into …
blink1073 Jan 28, 2025
b274210
debug
blink1073 Jan 28, 2025
5dbf4c7
Merge branch 'master' of github.com:mongodb/mongo-python-driver into …
blink1073 Feb 8, 2025
b853bc9
use ezra's branch
blink1073 Feb 8, 2025
84f7fd7
include test suites
blink1073 Feb 9, 2025
7e7a2fb
debug
blink1073 Feb 9, 2025
9088617
fix windows
blink1073 Feb 9, 2025
a417fbc
try another path
blink1073 Feb 9, 2025
feb4b45
debug
blink1073 Feb 9, 2025
48e1797
clean up path handling
blink1073 Feb 10, 2025
37b37c1
include the bin dir
blink1073 Feb 10, 2025
fd323b3
back to upstream
blink1073 Feb 10, 2025
598c97e
use bash
blink1073 Feb 10, 2025
02f807a
use bash
blink1073 Feb 10, 2025
e960fa9
clean up path handling
blink1073 Feb 10, 2025
d46bc75
debug
blink1073 Feb 10, 2025
3897e64
debug
blink1073 Feb 10, 2025
42647a3
more debug
blink1073 Feb 10, 2025
348851e
more debug
blink1073 Feb 10, 2025
c6ef95d
more debug
blink1073 Feb 10, 2025
03a7e91
more debug
blink1073 Feb 10, 2025
ecdb3a2
clean up bin dir handling
blink1073 Feb 10, 2025
3402133
clean up bin dir handling
blink1073 Feb 10, 2025
a043ade
debug
blink1073 Feb 10, 2025
9e69957
fix handling of paths
blink1073 Feb 10, 2025
a3c75b5
fix handling of paths
blink1073 Feb 10, 2025
c4311b7
fix handling of paths
blink1073 Feb 10, 2025
9446378
fix handling of paths
blink1073 Feb 10, 2025
5521c81
debug
blink1073 Feb 10, 2025
ba24509
debug
blink1073 Feb 10, 2025
6bad29d
debug
blink1073 Feb 10, 2025
8d6f297
use source
blink1073 Feb 10, 2025
79ce47d
fix path on windows
blink1073 Feb 11, 2025
9825b08
fix path on windows
blink1073 Feb 11, 2025
4656edd
fix path on windows
blink1073 Feb 11, 2025
8f2bacc
fix path on windows
blink1073 Feb 11, 2025
20c0bce
fix path on windows
blink1073 Feb 11, 2025
75301e9
fix paths
blink1073 Feb 11, 2025
5ab1348
cleanup
blink1073 Feb 11, 2025
072d3b2
cleanup workflow
blink1073 Feb 11, 2025
cc032d5
install deps unconditionally
blink1073 Feb 11, 2025
721c9ff
fix vm install
blink1073 Feb 11, 2025
6b63de0
fix vm install
blink1073 Feb 11, 2025
8c91f2e
fix vm install
blink1073 Feb 11, 2025
d7bfb05
debug path
blink1073 Feb 11, 2025
7969c87
debug path
blink1073 Feb 11, 2025
0169abf
debug path
blink1073 Feb 11, 2025
9dbfb25
debug path
blink1073 Feb 11, 2025
5223cca
try with no _BIN_DIR
blink1073 Feb 11, 2025
18ae78d
handle default uv path
blink1073 Feb 11, 2025
5626e24
handle default uv path
blink1073 Feb 11, 2025
e5e6dfe
syntax
blink1073 Feb 11, 2025
f415324
add bin dir to path
blink1073 Feb 11, 2025
58dd9a4
address review
blink1073 Feb 12, 2025
e2d9bb1
fix adl handling
blink1073 Feb 12, 2025
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
112 changes: 11 additions & 101 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ functions:
# Make an evergreen expansion file with dynamic values
- command: subprocess.exec
params:
include_expansions_in_env: ["is_patch", "project", "version_id", "AUTH", "SSL", "test_encryption", "test_encryption_pyopenssl", "test_crypt_shared", "test_pyopenssl", "SETDEFAULTENCODING", "test_loadbalancer", "test_serverless", "SKIP_CSOT_TESTS", "MONGODB_STARTED", "DISABLE_TEST_COMMANDS", "GREEN_FRAMEWORK", "NO_EXT", "COVERAGE", "COMPRESSORS", "TEST_SUITES", "MONGODB_API_VERSION", "skip_crypt_shared", "VERSION", "TOPOLOGY", "STORAGE_ENGINE", "ORCHESTRATION_FILE", "REQUIRE_API_VERSION", "LOAD_BALANCER", "skip_web_identity_auth_test", "skip_ECS_auth_test"]
include_expansions_in_env: ["is_patch", "project", "version_id", "AUTH", "SSL", "TEST_ENCRYPTION", "TEST_ENCRYPTION_PYOPENSSL", "TEST_CRYPT_SHARED", "TEST_PYOPENSSL", "SETDEFAULTENCODING", "TEST_LOADBALANCER", "TEST_SEVERLESS", "SKIP_CSOT_TESTS", "MONGODB_STARTED", "DISABLE_TEST_COMMANDS", "GREEN_FRAMEWORK", "NO_EXT", "COVERAGE", "COMPRESSORS", "MONGODB_API_VERSION", "skip_crypt_shared", "VERSION", "TOPOLOGY", "STORAGE_ENGINE", "ORCHESTRATION_FILE", "REQUIRE_API_VERSION", "LOAD_BALANCER", "skip_web_identity_auth_test", "skip_ECS_auth_test"]
binary: bash
working_dir: "src"
args:
Expand Down Expand Up @@ -274,39 +274,22 @@ functions:

"run tests":
- command: subprocess.exec
type: test
params:
include_expansions_in_env: ["TEST_DATA_LAKE", "PYTHON_BINARY", "AUTH", "SSL", "TEST_INDEX_MANAGEMENT", "CRYPT_SHARED_LIB_PATH", "test_encryption", "test_encryption_pyopenssl", "test_crypt_shared", "test_pyopenssl", "test_loadbalancer", "test_serverless", "ORCHESTRATION_FILE"]
include_expansions_in_env: ["TEST_DATA_LAKE", "PYTHON_BINARY", "AUTH", "SSL",
"AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN", "TEST_SUITES",
"TEST_INDEX_MANAGEMENT", "CRYPT_SHARED_LIB_PATH", "TEST_ENCRYPTION", "TEST_ENCRYPTION_PYOPENSSL",
"TEST_CRYPT_SHARED", "TEST_PYOPENSSL", "TEST_LOADBALANCER", "TEST_SEVERLESS", "MONGODB_URI"]
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/setup-tests.sh
- command: subprocess.exec
params:
working_dir: "src"
binary: bash
background: true
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
args:
- .evergreen/scripts/run-with-env.sh
- .evergreen/scripts/setup-encryption.sh
- command: subprocess.exec
type: test
params:
working_dir: "src"
binary: bash
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN", "PYTHON_BINARY", "TEST_DATA_LAKE", "TEST_INDEX_MANAGEMENT", "CRYPT_SHARED_LIB_PATH", "SINGLE_MONGOS_LB_URI", "MULTI_MONGOS_LB_URI", "TEST_SUITES"]
args:
- .evergreen/scripts/run-with-env.sh
- .evergreen/scripts/run-tests.sh

"run direct tests":
- command: subprocess.exec
type: test
params:
working_dir: "src"
binary: bash
include_expansions_in_env: ["PYTHON_BINARY"]
args: [ .evergreen/scripts/run-direct-tests.sh ]
args: [.evergreen/just.sh, test-eg]

"run enterprise auth tests":
- command: subprocess.exec
Expand Down Expand Up @@ -340,13 +323,6 @@ functions:
- ${DRIVERS_TOOLS}/.evergreen/auth_aws/setup-secrets.sh

"run aws auth test with regular aws credentials":
- command: subprocess.exec
params:
include_expansions_in_env: ["TEST_DATA_LAKE", "TEST_INDEX_MANAGEMENT", "CRYPT_SHARED_LIB_PATH", "test_encryption", "test_encryption_pyopenssl", "test_crypt_shared", "test_pyopenssl", "test_loadbalancer", "test_serverless", "ORCHESTRATION_FILE"]
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/setup-tests.sh
- command: subprocess.exec
type: test
params:
Expand All @@ -359,13 +335,6 @@ functions:
- regular

"run aws auth test with assume role credentials":
- command: subprocess.exec
params:
include_expansions_in_env: [ "TEST_DATA_LAKE", "TEST_INDEX_MANAGEMENT", "CRYPT_SHARED_LIB_PATH", "test_encryption", "test_encryption_pyopenssl", "test_crypt_shared", "test_pyopenssl", "test_loadbalancer", "test_serverless", "ORCHESTRATION_FILE" ]
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/setup-tests.sh
- command: subprocess.exec
type: test
params:
Expand All @@ -378,13 +347,6 @@ functions:
- assume-role

"run aws auth test with aws EC2 credentials":
- command: subprocess.exec
params:
include_expansions_in_env: [ "TEST_DATA_LAKE", "TEST_INDEX_MANAGEMENT", "CRYPT_SHARED_LIB_PATH", "test_encryption", "test_encryption_pyopenssl", "test_crypt_shared", "test_pyopenssl", "test_loadbalancer", "test_serverless", "ORCHESTRATION_FILE" ]
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/setup-tests.sh
- command: subprocess.exec
type: test
params:
Expand All @@ -397,13 +359,6 @@ functions:
- ec2

"run aws auth test with aws web identity credentials":
- command: subprocess.exec
params:
include_expansions_in_env: [ "TEST_DATA_LAKE", "TEST_INDEX_MANAGEMENT", "CRYPT_SHARED_LIB_PATH", "test_encryption", "test_encryption_pyopenssl", "test_crypt_shared", "test_pyopenssl", "test_loadbalancer", "test_serverless", "ORCHESTRATION_FILE" ]
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/setup-tests.sh
- # Test with and without AWS_ROLE_SESSION_NAME set.
- command: subprocess.exec
type: test
Expand All @@ -429,13 +384,6 @@ functions:
- web-identity

"run aws auth test with aws credentials as environment variables":
- command: subprocess.exec
params:
include_expansions_in_env: [ "TEST_DATA_LAKE", "TEST_INDEX_MANAGEMENT", "CRYPT_SHARED_LIB_PATH", "test_encryption", "test_encryption_pyopenssl", "test_crypt_shared", "test_pyopenssl", "test_loadbalancer", "test_serverless", "ORCHESTRATION_FILE" ]
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/setup-tests.sh
- command: subprocess.exec
type: test
params:
Expand All @@ -448,13 +396,6 @@ functions:
- env-creds

"run aws auth test with aws credentials and session token as environment variables":
- command: subprocess.exec
params:
include_expansions_in_env: [ "TEST_DATA_LAKE", "TEST_INDEX_MANAGEMENT", "CRYPT_SHARED_LIB_PATH", "test_encryption", "test_encryption_pyopenssl", "test_crypt_shared", "test_pyopenssl", "test_loadbalancer", "test_serverless", "ORCHESTRATION_FILE" ]
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/setup-tests.sh
- command: subprocess.exec
type: test
params:
Expand All @@ -467,13 +408,6 @@ functions:
- session-creds

"run oidc auth test with test credentials":
- command: subprocess.exec
params:
include_expansions_in_env: [ "TEST_DATA_LAKE", "TEST_INDEX_MANAGEMENT", "CRYPT_SHARED_LIB_PATH", "test_encryption", "test_encryption_pyopenssl", "test_crypt_shared", "test_pyopenssl", "test_loadbalancer", "test_serverless", "ORCHESTRATION_FILE" ]
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/setup-tests.sh
- command: subprocess.exec
type: test
params:
Expand Down Expand Up @@ -561,13 +495,6 @@ functions:
file: atlas-expansion.yml

"run-ocsp-test":
- command: subprocess.exec
params:
include_expansions_in_env: [ "TEST_DATA_LAKE", "TEST_INDEX_MANAGEMENT", "CRYPT_SHARED_LIB_PATH", "test_encryption", "test_encryption_pyopenssl", "test_crypt_shared", "test_pyopenssl", "test_loadbalancer", "test_serverless", "ORCHESTRATION_FILE" ]
binary: bash
working_dir: "src"
args:
- .evergreen/scripts/setup-tests.sh
- command: subprocess.exec
type: test
params:
Expand All @@ -587,25 +514,6 @@ functions:
args:
- ${DRIVERS_TOOLS}/.evergreen/ocsp/setup.sh

"run load-balancer":
- command: subprocess.exec
params:
binary: bash
include_expansions_in_env: ["MONGODB_URI"]
args:
- src/.evergreen/scripts/run-with-env.sh
- src/.evergreen/scripts/run-load-balancer.sh
- command: expansions.update
params:
file: lb-expansion.yml

"stop load-balancer":
- command: subprocess.exec
params:
binary: bash
args:
- src/.evergreen/scripts/stop-load-balancer.sh

"teardown atlas":
- command: subprocess.exec
params:
Expand Down Expand Up @@ -882,6 +790,7 @@ tasks:
- func: "run tests"
vars:
TEST_INDEX_MANAGEMENT: "1"
AUTH: "auth"

- name: "mod-wsgi-standalone"
tags: ["mod_wsgi"]
Expand Down Expand Up @@ -935,7 +844,7 @@ tasks:
vars:
VERSION: "8.0"
TOPOLOGY: "replica_set"
- func: "run direct tests"
- func: "run tests"

- name: "atlas-connect"
tags: ["atlas-connect"]
Expand Down Expand Up @@ -1503,7 +1412,7 @@ tasks:
- name: "testgcpkms-task"
commands:
- command: subprocess.exec
type: setup
type: test
params:
working_dir: "src"
binary: bash
Expand Down Expand Up @@ -1531,6 +1440,7 @@ tasks:
- name: testazurekms-task
commands:
- command: subprocess.exec
type: test
params:
binary: bash
working_dir: src
Expand Down
9 changes: 3 additions & 6 deletions .evergreen/generated_configs/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ tasks:
AUTH: auth
SSL: ssl
LOAD_BALANCER: "true"
- func: run load-balancer
- func: run tests
vars:
AUTH: auth
SSL: ssl
test_loadbalancer: "true"
TEST_LOADBALANCER: "true"
tags: [load-balancer, auth, ssl]
- name: test-load-balancer-noauth-ssl
commands:
Expand All @@ -23,12 +22,11 @@ tasks:
AUTH: noauth
SSL: ssl
LOAD_BALANCER: "true"
- func: run load-balancer
- func: run tests
vars:
AUTH: noauth
SSL: ssl
test_loadbalancer: "true"
TEST_LOADBALANCER: "true"
tags: [load-balancer, noauth, ssl]
- name: test-load-balancer-noauth-nossl
commands:
Expand All @@ -38,12 +36,11 @@ tasks:
AUTH: noauth
SSL: nossl
LOAD_BALANCER: "true"
- func: run load-balancer
- func: run tests
vars:
AUTH: noauth
SSL: nossl
test_loadbalancer: "true"
TEST_LOADBALANCER: "true"
tags: [load-balancer, noauth, nossl]

# Server tests
Expand Down
Loading
Loading