From 58620ac445173e2c53814f755fccd27dc016fff1 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 15 Feb 2025 21:09:23 -0600 Subject: [PATCH 01/42] make setup test into a cli --- .evergreen/config.yml | 37 +- .evergreen/generated_configs/tasks.yml | 411 +++++++----------- .evergreen/generated_configs/variants.yml | 60 ++- .evergreen/run-azurekms-fail-test.sh | 3 +- .evergreen/run-azurekms-test.sh | 2 +- .evergreen/run-gcpkms-test.sh | 2 +- .evergreen/run-mongodb-aws-ecs-test.sh | 3 +- .evergreen/run-mongodb-oidc-test.sh | 2 +- .evergreen/run-perf-tests.sh | 3 +- .evergreen/run-tests.sh | 6 +- .../scripts/bootstrap-mongo-orchestration.sh | 7 +- .evergreen/scripts/configure-env.sh | 19 - .evergreen/scripts/generate_config.py | 24 +- .evergreen/scripts/run-atlas-tests.sh | 2 +- .evergreen/scripts/run-gcpkms-fail-test.sh | 2 +- .evergreen/scripts/run-mockupdb-tests.sh | 5 - .evergreen/scripts/run-mongodb-aws-test.sh | 2 +- .evergreen/scripts/run-ocsp-test.sh | 12 +- .evergreen/scripts/setup-tests.py | 224 ++++++---- .evergreen/scripts/setup-tests.sh | 43 +- CONTRIBUTING.md | 4 +- justfile | 8 +- test/asynchronous/test_client_context.py | 6 +- test/asynchronous/test_data_lake.py | 4 - test/asynchronous/test_index_management.py | 4 - test/test_client_context.py | 6 +- test/test_data_lake.py | 4 - test/test_index_management.py | 4 - 28 files changed, 385 insertions(+), 524 deletions(-) delete mode 100755 .evergreen/scripts/run-mockupdb-tests.sh diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 028caf4d9b..1295cfaa47 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -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_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"] + include_expansions_in_env: ["is_patch", "project", "version_id", "skip_web_identity_auth_test", "skip_ECS_auth_test"] binary: bash working_dir: "src" args: @@ -205,9 +205,9 @@ functions: - command: subprocess.exec params: binary: bash - include_expansions_in_env: ["VERSION", "TOPOLOGY", "AUTH", "SSL", "ORCHESTRATION_FILE", "LOAD_BALANCER"] + include_expansions_in_env: [VERSION, TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE, LOAD_BALANCER, + STORAGE_ENGINE, REQUIRE_API_VERSION, DRIVERS_TOOLS] args: - - src/.evergreen/scripts/run-with-env.sh - src/.evergreen/scripts/bootstrap-mongo-orchestration.sh - command: expansions.update params: @@ -250,17 +250,6 @@ functions: - .evergreen/scripts/run-with-env.sh - .evergreen/scripts/run-mod-wsgi-tests.sh - "run mockupdb tests": - - command: subprocess.exec - type: test - params: - include_expansions_in_env: ["PYTHON_BINARY"] - working_dir: "src" - binary: bash - args: - - .evergreen/scripts/run-with-env.sh - - .evergreen/scripts/run-mockupdb-tests.sh - "run doctests": - command: subprocess.exec type: test @@ -276,14 +265,12 @@ functions: - command: subprocess.exec type: test params: - 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"] + include_expansions_in_env: [AUTH, SSL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, + AWS_SESSION_TOKEN, COVERAGE, PYTHON_BINARY, LIBMONGOCRYPT_URL, MONGODB_URI, + MONGODB_STARTED, DISABLE_TEST_COMMANDS, GREEN_FRAMEWORK, NO_EXT, COMPRESSORS, SETDEFAULTENCODING] binary: bash working_dir: "src" - args: - - .evergreen/scripts/setup-tests.sh + args: [.evergreen/just.sh, setup-tests, "${TEST_NAME}", "${SUB_TEST_NAME}"] - command: subprocess.exec type: test params: @@ -755,7 +742,9 @@ tasks: - name: "mockupdb" tags: ["mockupdb"] commands: - - func: "run mockupdb tests" + - func: "run tests" + vars: + TEST_NAME: mockupdb - name: "doctests" tags: ["doctests"] @@ -770,6 +759,8 @@ tasks: tags: ["serverless"] commands: - func: "run tests" + vars: + TEST_NAME: serverless - name: "test-enterprise-auth" tags: ["enterprise-auth"] @@ -789,7 +780,7 @@ tasks: TOPOLOGY: "replica_set" - func: "run tests" vars: - TEST_INDEX_MANAGEMENT: "1" + TEST_NAME: index_management AUTH: "auth" - name: "mod-wsgi-standalone" @@ -857,7 +848,7 @@ tasks: - func: "bootstrap data lake" - func: "run tests" vars: - TEST_DATA_LAKE: "true" + TEST_NAME: "data_lake" - name: "test-aws-lambda-deployed" commands: diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 6b17035748..95fa266988 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -12,7 +12,7 @@ tasks: vars: AUTH: auth SSL: ssl - TEST_LOADBALANCER: "true" + TEST_NAME: load_balancer tags: [load-balancer, auth, ssl] - name: test-load-balancer-noauth-ssl commands: @@ -26,7 +26,7 @@ tasks: vars: AUTH: noauth SSL: ssl - TEST_LOADBALANCER: "true" + TEST_NAME: load_balancer tags: [load-balancer, noauth, ssl] - name: test-load-balancer-noauth-nossl commands: @@ -40,7 +40,7 @@ tasks: vars: AUTH: noauth SSL: nossl - TEST_LOADBALANCER: "true" + TEST_NAME: load_balancer tags: [load-balancer, noauth, nossl] # Server tests @@ -57,7 +57,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.0" - standalone @@ -77,7 +77,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.0" - standalone @@ -97,7 +97,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.0" - standalone @@ -117,7 +116,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.0" - standalone @@ -137,7 +136,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.0" - standalone @@ -157,7 +156,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.0" - standalone @@ -177,7 +175,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.0" - standalone @@ -197,7 +195,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.0" - standalone @@ -217,7 +215,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "4.0" - standalone @@ -237,7 +234,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.2" - standalone @@ -257,7 +254,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.2" - standalone @@ -277,7 +274,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.2" - standalone @@ -297,7 +293,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.2" - standalone @@ -317,7 +313,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.2" - standalone @@ -337,7 +333,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.2" - standalone @@ -357,7 +352,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.2" - standalone @@ -377,7 +372,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.2" - standalone @@ -397,7 +392,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "4.2" - standalone @@ -417,7 +411,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.4" - standalone @@ -437,7 +431,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.4" - standalone @@ -457,7 +451,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.4" - standalone @@ -477,7 +470,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.4" - standalone @@ -497,7 +490,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.4" - standalone @@ -517,7 +510,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.4" - standalone @@ -537,7 +529,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.4" - standalone @@ -557,7 +549,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.4" - standalone @@ -577,7 +569,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "4.4" - standalone @@ -597,7 +588,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "5.0" - standalone @@ -617,7 +608,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "5.0" - standalone @@ -637,7 +628,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "5.0" - standalone @@ -657,7 +647,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "5.0" - standalone @@ -677,7 +667,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "5.0" - standalone @@ -697,7 +687,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "5.0" - standalone @@ -717,7 +706,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "5.0" - standalone @@ -737,7 +726,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "5.0" - standalone @@ -757,7 +746,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "5.0" - standalone @@ -777,7 +765,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "6.0" - standalone @@ -797,7 +785,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "6.0" - standalone @@ -817,7 +805,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "6.0" - standalone @@ -837,7 +824,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "6.0" - standalone @@ -857,7 +844,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "6.0" - standalone @@ -877,7 +864,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "6.0" - standalone @@ -897,7 +883,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "6.0" - standalone @@ -917,7 +903,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "6.0" - standalone @@ -937,7 +923,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "6.0" - standalone @@ -957,7 +942,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "7.0" - standalone @@ -977,7 +962,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "7.0" - standalone @@ -997,7 +982,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "7.0" - standalone @@ -1017,7 +1001,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "7.0" - standalone @@ -1037,7 +1021,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "7.0" - standalone @@ -1057,7 +1041,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "7.0" - standalone @@ -1077,7 +1060,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "7.0" - standalone @@ -1097,7 +1080,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "7.0" - standalone @@ -1117,7 +1100,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "7.0" - standalone @@ -1137,7 +1119,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "8.0" - standalone @@ -1157,7 +1139,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "8.0" - standalone @@ -1177,7 +1159,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "8.0" - standalone @@ -1197,7 +1178,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "8.0" - standalone @@ -1217,7 +1198,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "8.0" - standalone @@ -1237,7 +1218,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "8.0" - standalone @@ -1257,7 +1237,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "8.0" - standalone @@ -1277,7 +1257,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "8.0" - standalone @@ -1297,7 +1277,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "8.0" - standalone @@ -1317,7 +1296,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - rapid - standalone @@ -1337,7 +1316,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - rapid - standalone @@ -1357,7 +1336,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - rapid - standalone @@ -1377,7 +1355,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - rapid - standalone @@ -1397,7 +1375,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - rapid - standalone @@ -1417,7 +1395,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - rapid - standalone @@ -1437,7 +1414,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - rapid - standalone @@ -1457,7 +1434,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - rapid - standalone @@ -1477,7 +1454,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - rapid - standalone @@ -1497,7 +1473,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - latest - standalone @@ -1517,7 +1493,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - latest - standalone @@ -1537,7 +1513,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - latest - standalone @@ -1557,7 +1532,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - latest - standalone @@ -1577,7 +1552,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - latest - standalone @@ -1597,7 +1572,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - latest - standalone @@ -1617,7 +1591,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - latest - standalone @@ -1637,7 +1611,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - latest - standalone @@ -1657,7 +1631,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - latest - standalone @@ -1677,7 +1650,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.0" - replica_set @@ -1697,7 +1670,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.0" - replica_set @@ -1717,7 +1690,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.0" - replica_set @@ -1737,7 +1709,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.0" - replica_set @@ -1757,7 +1729,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.0" - replica_set @@ -1777,7 +1749,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.0" - replica_set @@ -1797,7 +1768,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.0" - replica_set @@ -1817,7 +1788,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.0" - replica_set @@ -1837,7 +1808,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "4.0" - replica_set @@ -1857,7 +1827,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.2" - replica_set @@ -1877,7 +1847,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.2" - replica_set @@ -1897,7 +1867,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.2" - replica_set @@ -1917,7 +1886,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.2" - replica_set @@ -1937,7 +1906,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.2" - replica_set @@ -1957,7 +1926,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.2" - replica_set @@ -1977,7 +1945,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.2" - replica_set @@ -1997,7 +1965,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.2" - replica_set @@ -2017,7 +1985,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "4.2" - replica_set @@ -2037,7 +2004,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.4" - replica_set @@ -2057,7 +2024,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.4" - replica_set @@ -2077,7 +2044,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.4" - replica_set @@ -2097,7 +2063,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.4" - replica_set @@ -2117,7 +2083,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.4" - replica_set @@ -2137,7 +2103,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.4" - replica_set @@ -2157,7 +2122,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.4" - replica_set @@ -2177,7 +2142,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.4" - replica_set @@ -2197,7 +2162,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "4.4" - replica_set @@ -2217,7 +2181,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "5.0" - replica_set @@ -2237,7 +2201,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "5.0" - replica_set @@ -2257,7 +2221,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "5.0" - replica_set @@ -2277,7 +2240,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "5.0" - replica_set @@ -2297,7 +2260,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "5.0" - replica_set @@ -2317,7 +2280,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "5.0" - replica_set @@ -2337,7 +2299,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "5.0" - replica_set @@ -2357,7 +2319,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "5.0" - replica_set @@ -2377,7 +2339,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "5.0" - replica_set @@ -2397,7 +2358,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "6.0" - replica_set @@ -2417,7 +2378,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "6.0" - replica_set @@ -2437,7 +2398,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "6.0" - replica_set @@ -2457,7 +2417,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "6.0" - replica_set @@ -2477,7 +2437,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "6.0" - replica_set @@ -2497,7 +2457,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "6.0" - replica_set @@ -2517,7 +2476,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "6.0" - replica_set @@ -2537,7 +2496,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "6.0" - replica_set @@ -2557,7 +2516,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "6.0" - replica_set @@ -2577,7 +2535,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "7.0" - replica_set @@ -2597,7 +2555,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "7.0" - replica_set @@ -2617,7 +2575,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "7.0" - replica_set @@ -2637,7 +2594,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "7.0" - replica_set @@ -2657,7 +2614,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "7.0" - replica_set @@ -2677,7 +2634,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "7.0" - replica_set @@ -2697,7 +2653,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "7.0" - replica_set @@ -2717,7 +2673,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "7.0" - replica_set @@ -2737,7 +2693,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "7.0" - replica_set @@ -2757,7 +2712,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "8.0" - replica_set @@ -2777,7 +2732,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "8.0" - replica_set @@ -2797,7 +2752,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "8.0" - replica_set @@ -2817,7 +2771,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "8.0" - replica_set @@ -2837,7 +2791,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "8.0" - replica_set @@ -2857,7 +2811,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "8.0" - replica_set @@ -2877,7 +2830,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "8.0" - replica_set @@ -2897,7 +2850,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "8.0" - replica_set @@ -2917,7 +2870,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "8.0" - replica_set @@ -2937,7 +2889,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - rapid - replica_set @@ -2957,7 +2909,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - rapid - replica_set @@ -2977,7 +2929,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - rapid - replica_set @@ -2997,7 +2948,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - rapid - replica_set @@ -3017,7 +2968,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - rapid - replica_set @@ -3037,7 +2988,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - rapid - replica_set @@ -3057,7 +3007,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - rapid - replica_set @@ -3077,7 +3027,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - rapid - replica_set @@ -3097,7 +3047,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - rapid - replica_set @@ -3117,7 +3066,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - latest - replica_set @@ -3137,7 +3086,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - latest - replica_set @@ -3157,7 +3106,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - latest - replica_set @@ -3177,7 +3125,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - latest - replica_set @@ -3197,7 +3145,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - latest - replica_set @@ -3217,7 +3165,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - latest - replica_set @@ -3237,7 +3184,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - latest - replica_set @@ -3257,7 +3204,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - latest - replica_set @@ -3277,7 +3224,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - latest - replica_set @@ -3297,7 +3243,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.0" - sharded_cluster @@ -3317,7 +3263,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.0" - sharded_cluster @@ -3337,7 +3283,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.0" - sharded_cluster @@ -3357,7 +3302,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.0" - sharded_cluster @@ -3377,7 +3322,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.0" - sharded_cluster @@ -3397,7 +3342,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.0" - sharded_cluster @@ -3417,7 +3361,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.0" - sharded_cluster @@ -3437,7 +3381,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.0" - sharded_cluster @@ -3457,7 +3401,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "4.0" - sharded_cluster @@ -3477,7 +3420,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.2" - sharded_cluster @@ -3497,7 +3440,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.2" - sharded_cluster @@ -3517,7 +3460,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.2" - sharded_cluster @@ -3537,7 +3479,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.2" - sharded_cluster @@ -3557,7 +3499,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.2" - sharded_cluster @@ -3577,7 +3519,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.2" - sharded_cluster @@ -3597,7 +3538,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.2" - sharded_cluster @@ -3617,7 +3558,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.2" - sharded_cluster @@ -3637,7 +3578,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "4.2" - sharded_cluster @@ -3657,7 +3597,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.4" - sharded_cluster @@ -3677,7 +3617,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.4" - sharded_cluster @@ -3697,7 +3637,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.4" - sharded_cluster @@ -3717,7 +3656,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.4" - sharded_cluster @@ -3737,7 +3676,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.4" - sharded_cluster @@ -3757,7 +3696,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "4.4" - sharded_cluster @@ -3777,7 +3715,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "4.4" - sharded_cluster @@ -3797,7 +3735,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "4.4" - sharded_cluster @@ -3817,7 +3755,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "4.4" - sharded_cluster @@ -3837,7 +3774,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "5.0" - sharded_cluster @@ -3857,7 +3794,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "5.0" - sharded_cluster @@ -3877,7 +3814,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "5.0" - sharded_cluster @@ -3897,7 +3833,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "5.0" - sharded_cluster @@ -3917,7 +3853,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "5.0" - sharded_cluster @@ -3937,7 +3873,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "5.0" - sharded_cluster @@ -3957,7 +3892,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "5.0" - sharded_cluster @@ -3977,7 +3912,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "5.0" - sharded_cluster @@ -3997,7 +3932,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "5.0" - sharded_cluster @@ -4017,7 +3951,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "6.0" - sharded_cluster @@ -4037,7 +3971,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "6.0" - sharded_cluster @@ -4057,7 +3991,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "6.0" - sharded_cluster @@ -4077,7 +4010,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "6.0" - sharded_cluster @@ -4097,7 +4030,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "6.0" - sharded_cluster @@ -4117,7 +4050,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "6.0" - sharded_cluster @@ -4137,7 +4069,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "6.0" - sharded_cluster @@ -4157,7 +4089,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "6.0" - sharded_cluster @@ -4177,7 +4109,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "6.0" - sharded_cluster @@ -4197,7 +4128,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "7.0" - sharded_cluster @@ -4217,7 +4148,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "7.0" - sharded_cluster @@ -4237,7 +4168,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "7.0" - sharded_cluster @@ -4257,7 +4187,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "7.0" - sharded_cluster @@ -4277,7 +4207,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "7.0" - sharded_cluster @@ -4297,7 +4227,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "7.0" - sharded_cluster @@ -4317,7 +4246,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "7.0" - sharded_cluster @@ -4337,7 +4266,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "7.0" - sharded_cluster @@ -4357,7 +4286,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "7.0" - sharded_cluster @@ -4377,7 +4305,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "8.0" - sharded_cluster @@ -4397,7 +4325,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "8.0" - sharded_cluster @@ -4417,7 +4345,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "8.0" - sharded_cluster @@ -4437,7 +4364,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "8.0" - sharded_cluster @@ -4457,7 +4384,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "8.0" - sharded_cluster @@ -4477,7 +4404,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - "8.0" - sharded_cluster @@ -4497,7 +4423,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - "8.0" - sharded_cluster @@ -4517,7 +4443,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - "8.0" - sharded_cluster @@ -4537,7 +4463,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - "8.0" - sharded_cluster @@ -4557,7 +4482,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - rapid - sharded_cluster @@ -4577,7 +4502,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - rapid - sharded_cluster @@ -4597,7 +4522,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - rapid - sharded_cluster @@ -4617,7 +4541,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - rapid - sharded_cluster @@ -4637,7 +4561,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - rapid - sharded_cluster @@ -4657,7 +4581,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - rapid - sharded_cluster @@ -4677,7 +4600,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - rapid - sharded_cluster @@ -4697,7 +4620,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - rapid - sharded_cluster @@ -4717,7 +4640,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - rapid - sharded_cluster @@ -4737,7 +4659,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - latest - sharded_cluster @@ -4757,7 +4679,7 @@ tasks: AUTH: auth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - latest - sharded_cluster @@ -4777,7 +4699,6 @@ tasks: AUTH: auth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - latest - sharded_cluster @@ -4797,7 +4718,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - latest - sharded_cluster @@ -4817,7 +4738,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - latest - sharded_cluster @@ -4837,7 +4758,6 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync_async - TEST_SUITES: "" tags: - latest - sharded_cluster @@ -4857,7 +4777,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_SUITES: default + TEST_NAME: default tags: - latest - sharded_cluster @@ -4877,7 +4797,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: async - TEST_SUITES: default_async + TEST_NAME: default_async tags: - latest - sharded_cluster @@ -4897,7 +4817,6 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync_async - TEST_SUITES: "" tags: - latest - sharded_cluster diff --git a/.evergreen/generated_configs/variants.yml b/.evergreen/generated_configs/variants.yml index 531f23eb66..aa0047370a 100644 --- a/.evergreen/generated_configs/variants.yml +++ b/.evergreen/generated_configs/variants.yml @@ -318,7 +318,7 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption PYTHON_BINARY: /opt/python/3.9/bin/python3 tags: [encryption_tag] - name: encryption-rhel8-python3.13 @@ -331,7 +331,7 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption PYTHON_BINARY: /opt/python/3.13/bin/python3 tags: [encryption_tag] - name: encryption-rhel8-pypy3.10 @@ -344,7 +344,7 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 tags: [encryption_tag] - name: encryption-crypt_shared-rhel8-python3.9 @@ -357,7 +357,7 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /opt/python/3.9/bin/python3 tags: [encryption_tag] @@ -371,7 +371,7 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /opt/python/3.13/bin/python3 tags: [encryption_tag] @@ -385,7 +385,7 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 tags: [encryption_tag] @@ -399,8 +399,7 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" - TEST_ENCRYPTION_PYOPENSSL: "true" + TEST_NAME: encryption_pyopenssl PYTHON_BINARY: /opt/python/3.9/bin/python3 tags: [encryption_tag] - name: encryption-pyopenssl-rhel8-python3.13 @@ -413,8 +412,7 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" - TEST_ENCRYPTION_PYOPENSSL: "true" + TEST_NAME: encryption_pyopenssl PYTHON_BINARY: /opt/python/3.13/bin/python3 tags: [encryption_tag] - name: encryption-pyopenssl-rhel8-pypy3.10 @@ -427,8 +425,7 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" - TEST_ENCRYPTION_PYOPENSSL: "true" + TEST_NAME: encryption_pyopenssl PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 tags: [encryption_tag] - name: encryption-rhel8-python3.10 @@ -438,7 +435,7 @@ buildvariants: run_on: - rhel87-small expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption PYTHON_BINARY: /opt/python/3.10/bin/python3 - name: encryption-crypt_shared-rhel8-python3.11 tasks: @@ -447,7 +444,7 @@ buildvariants: run_on: - rhel87-small expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /opt/python/3.11/bin/python3 - name: encryption-pyopenssl-rhel8-python3.12 @@ -457,8 +454,7 @@ buildvariants: run_on: - rhel87-small expansions: - TEST_ENCRYPTION: "true" - TEST_ENCRYPTION_PYOPENSSL: "true" + TEST_NAME: encryption_pyopenssl PYTHON_BINARY: /opt/python/3.12/bin/python3 - name: encryption-macos-python3.9 tasks: @@ -468,7 +464,7 @@ buildvariants: - macos-14 batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 tags: [encryption_tag] - name: encryption-macos-python3.13 @@ -479,7 +475,7 @@ buildvariants: - macos-14 batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 tags: [encryption_tag] - name: encryption-crypt_shared-macos-python3.9 @@ -490,7 +486,7 @@ buildvariants: - macos-14 batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 tags: [encryption_tag] @@ -502,7 +498,7 @@ buildvariants: - macos-14 batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption TEST_CRYPT_SHARED: "true" PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3 tags: [encryption_tag] @@ -514,7 +510,7 @@ buildvariants: - windows-64-vsMulti-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption PYTHON_BINARY: C:/python/Python39/python.exe tags: [encryption_tag] - name: encryption-win64-python3.13 @@ -525,7 +521,7 @@ buildvariants: - windows-64-vsMulti-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption PYTHON_BINARY: C:/python/Python313/python.exe tags: [encryption_tag] - name: encryption-crypt_shared-win64-python3.9 @@ -536,7 +532,7 @@ buildvariants: - windows-64-vsMulti-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption TEST_CRYPT_SHARED: "true" PYTHON_BINARY: C:/python/Python39/python.exe tags: [encryption_tag] @@ -548,7 +544,7 @@ buildvariants: - windows-64-vsMulti-small batchtime: 10080 expansions: - TEST_ENCRYPTION: "true" + TEST_NAME: encryption TEST_CRYPT_SHARED: "true" PYTHON_BINARY: C:/python/Python313/python.exe tags: [encryption_tag] @@ -1010,7 +1006,7 @@ buildvariants: - macos-14 batchtime: 10080 expansions: - TEST_PYOPENSSL: "true" + TEST_NAME: pyopenssl PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3 - name: pyopenssl-rhel8-python3.10 tasks: @@ -1021,7 +1017,7 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_PYOPENSSL: "true" + TEST_NAME: pyopenssl PYTHON_BINARY: /opt/python/3.10/bin/python3 - name: pyopenssl-rhel8-python3.11 tasks: @@ -1032,7 +1028,7 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_PYOPENSSL: "true" + TEST_NAME: pyopenssl PYTHON_BINARY: /opt/python/3.11/bin/python3 - name: pyopenssl-rhel8-python3.12 tasks: @@ -1043,7 +1039,7 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_PYOPENSSL: "true" + TEST_NAME: pyopenssl PYTHON_BINARY: /opt/python/3.12/bin/python3 - name: pyopenssl-win64-python3.13 tasks: @@ -1054,7 +1050,7 @@ buildvariants: - windows-64-vsMulti-small batchtime: 10080 expansions: - TEST_PYOPENSSL: "true" + TEST_NAME: pyopenssl PYTHON_BINARY: C:/python/Python313/python.exe - name: pyopenssl-rhel8-pypy3.10 tasks: @@ -1065,7 +1061,7 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_PYOPENSSL: "true" + TEST_NAME: pyopenssl PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 # Search index tests @@ -1301,7 +1297,7 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_SERVERLESS: "true" + TEST_NAME: serverless AUTH: auth SSL: ssl PYTHON_BINARY: /opt/python/3.9/bin/python3 @@ -1313,7 +1309,7 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_SERVERLESS: "true" + TEST_NAME: serverless AUTH: auth SSL: ssl PYTHON_BINARY: /opt/python/3.13/bin/python3 diff --git a/.evergreen/run-azurekms-fail-test.sh b/.evergreen/run-azurekms-fail-test.sh index 31ca30b3e2..6083e66bc6 100755 --- a/.evergreen/run-azurekms-fail-test.sh +++ b/.evergreen/run-azurekms-fail-test.sh @@ -2,8 +2,7 @@ set -o errexit # Exit the script with error if any of the commands fail HERE=$(dirname ${BASH_SOURCE:-$0}) . $DRIVERS_TOOLS/.evergreen/csfle/azurekms/setup-secrets.sh -export LIBMONGOCRYPT_URL=https://s3.amazonaws.com/mciuploads/libmongocrypt/debian11/master/latest/libmongocrypt.tar.gz -SUCCESS=false TEST_FLE_AZURE_AUTO=1 bash $HERE/scripts/setup-tests.sh +SUCCESS=false bash $HERE/scripts/setup-tests.sh kms azure PYTHON_BINARY=/opt/mongodbtoolchain/v4/bin/python3 \ KEY_NAME="${AZUREKMS_KEYNAME}" \ KEY_VAULT_ENDPOINT="${AZUREKMS_KEYVAULTENDPOINT}" \ diff --git a/.evergreen/run-azurekms-test.sh b/.evergreen/run-azurekms-test.sh index 27cb3fb315..1ac6c4b26c 100755 --- a/.evergreen/run-azurekms-test.sh +++ b/.evergreen/run-azurekms-test.sh @@ -20,7 +20,7 @@ AZUREKMS_CMD="tar xf mongo-python-driver.tgz" \ $DRIVERS_TOOLS/.evergreen/csfle/azurekms/run-command.sh echo "Untarring file ... end" echo "Running test ... begin" -AZUREKMS_CMD="SUCCESS=true TEST_FLE_AZURE_AUTO=1 LIBMONGOCRYPT_URL=$LIBMONGOCRYPT_URL bash .evergreen/just.sh setup-test" \ +AZUREKMS_CMD="SUCCESS=true LIBMONGOCRYPT_URL=$LIBMONGOCRYPT_URL bash .evergreen/just.sh setup-test kms azure" \ $DRIVERS_TOOLS/.evergreen/csfle/azurekms/run-command.sh AZUREKMS_CMD="KEY_NAME=\"$AZUREKMS_KEYNAME\" KEY_VAULT_ENDPOINT=\"$AZUREKMS_KEYVAULTENDPOINT\" bash ./.evergreen/just.sh test-eg" \ $DRIVERS_TOOLS/.evergreen/csfle/azurekms/run-command.sh diff --git a/.evergreen/run-gcpkms-test.sh b/.evergreen/run-gcpkms-test.sh index 077ca0cb9f..40b587f117 100755 --- a/.evergreen/run-gcpkms-test.sh +++ b/.evergreen/run-gcpkms-test.sh @@ -19,7 +19,7 @@ echo "Untarring file ... begin" GCPKMS_CMD="tar xf mongo-python-driver.tgz" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh echo "Untarring file ... end" echo "Running test ... begin" -GCPKMS_CMD="SUCCESS=true TEST_FLE_GCP_AUTO=1 LIBMONGOCRYPT_URL=$LIBMONGOCRYPT_URL bash ./.evergreen/just.sh setup-test" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh +GCPKMS_CMD="SUCCESS=true LIBMONGOCRYPT_URL=$LIBMONGOCRYPT_URL bash ./.evergreen/just.sh setup-test kms gcp" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh GCPKMS_CMD="./.evergreen/just.sh test-eg" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh echo "Running test ... end" bash $HERE/scripts/teardown-tests.sh diff --git a/.evergreen/run-mongodb-aws-ecs-test.sh b/.evergreen/run-mongodb-aws-ecs-test.sh index 96d3c0611e..2f06c1eba2 100755 --- a/.evergreen/run-mongodb-aws-ecs-test.sh +++ b/.evergreen/run-mongodb-aws-ecs-test.sh @@ -26,10 +26,9 @@ apt-get -qq update < /dev/null > /dev/null apt-get -qq install $PYTHON_VER $PYTHON_VER-venv build-essential $PYTHON_VER-dev -y < /dev/null > /dev/null export PYTHON_BINARY=$PYTHON_VER -export TEST_AUTH_AWS=1 export AUTH="auth" export SET_XTRACE_ON=1 cd src rm -rf .venv -bash ./.evergreen/just.sh setup-test +bash ./.evergreen/just.sh setup-test auth_aws bash .evergreen/just.sh test-eg diff --git a/.evergreen/run-mongodb-oidc-test.sh b/.evergreen/run-mongodb-oidc-test.sh index 552f9ef08e..5d3ca65979 100755 --- a/.evergreen/run-mongodb-oidc-test.sh +++ b/.evergreen/run-mongodb-oidc-test.sh @@ -29,5 +29,5 @@ else exit 1 fi -TEST_AUTH_OIDC=1 COVERAGE=1 AUTH="auth" bash ./.evergreen/just.sh setup-test +COVERAGE=1 AUTH="auth" bash ./.evergreen/just.sh setup-test auth_oidc bash ./.evergreen/just.sh test-eg "${@:1}" diff --git a/.evergreen/run-perf-tests.sh b/.evergreen/run-perf-tests.sh index d0e001c5fc..85a82c2a5a 100755 --- a/.evergreen/run-perf-tests.sh +++ b/.evergreen/run-perf-tests.sh @@ -14,7 +14,6 @@ export TEST_PATH="${PROJECT_DIRECTORY}/specifications/source/benchmarking/data" export OUTPUT_FILE="${PROJECT_DIRECTORY}/results.json" export PYTHON_BINARY=/opt/mongodbtoolchain/v4/bin/python3 -export PERF_TEST=1 -bash ./.evergreen/just.sh setup-test +bash ./.evergreen/just.sh setup-test perf bash ./.evergreen/just.sh test-eg diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 12935b25a0..979cf5beac 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -16,7 +16,7 @@ else echo "Not sourcing env inputs" fi -# Ensure there are test inputs. +# Handle test inputs. if [ -f $SCRIPT_DIR/scripts/test-env.sh ]; then echo "Sourcing test inputs" . $SCRIPT_DIR/scripts/test-env.sh @@ -54,7 +54,7 @@ uv run python -c 'import sys; print(sys.version)' PIP_QUIET=0 uv run ${UV_ARGS} --with pip pip list # Record the start time for a perf test. -if [ -n "${PERF_TEST:-}" ]; then +if [ -n "${TEST_PERF:-}" ]; then start_time=$(date +%s) fi @@ -75,7 +75,7 @@ fi echo "Running tests with $TEST_ARGS... done." # Handle perf test post actions. -if [ -n "${PERF_TEST:-}" ]; then +if [ -n "${TEST_PERF:-}" ]; then end_time=$(date +%s) elapsed_secs=$((end_time-start_time)) diff --git a/.evergreen/scripts/bootstrap-mongo-orchestration.sh b/.evergreen/scripts/bootstrap-mongo-orchestration.sh index 1d2b145de8..947d033cf5 100755 --- a/.evergreen/scripts/bootstrap-mongo-orchestration.sh +++ b/.evergreen/scripts/bootstrap-mongo-orchestration.sh @@ -1,6 +1,7 @@ #!/bin/bash -set -o xtrace +set -eu + # Enable core dumps if enabled on the machine # Copied from https://github.com/mongodb/mongo/blob/master/etc/evergreen.yml @@ -29,10 +30,6 @@ if [ "$(uname -s)" = "Darwin" ]; then fi fi -if [ -n "${skip_crypt_shared}" ]; then - export SKIP_CRYPT_SHARED=1 -fi - MONGODB_VERSION=${VERSION} \ TOPOLOGY=${TOPOLOGY} \ AUTH=${AUTH:-noauth} \ diff --git a/.evergreen/scripts/configure-env.sh b/.evergreen/scripts/configure-env.sh index 16212ad3b1..5515413562 100755 --- a/.evergreen/scripts/configure-env.sh +++ b/.evergreen/scripts/configure-env.sh @@ -55,24 +55,11 @@ export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin" cat < "$SCRIPT_DIR"/env.sh export PROJECT_DIRECTORY="$PROJECT_DIRECTORY" export CURRENT_VERSION="$CURRENT_VERSION" -export SKIP_LEGACY_SHELL=1 export DRIVERS_TOOLS="$DRIVERS_TOOLS" export MONGO_ORCHESTRATION_HOME="$MONGO_ORCHESTRATION_HOME" export MONGODB_BINARIES="$MONGODB_BINARIES" export DRIVERS_TOOLS_BINARIES="$DRIVERS_TOOLS_BINARIES" export PROJECT_DIRECTORY="$PROJECT_DIRECTORY" -export SETDEFAULTENCODING="${SETDEFAULTENCODING:-}" -export SKIP_CSOT_TESTS="${SKIP_CSOT_TESTS:-}" -export MONGODB_STARTED="${MONGODB_STARTED:-}" -export DISABLE_TEST_COMMANDS="${DISABLE_TEST_COMMANDS:-}" -export GREEN_FRAMEWORK="${GREEN_FRAMEWORK:-}" -export NO_EXT="${NO_EXT:-}" -export COVERAGE="${COVERAGE:-}" -export COMPRESSORS="${COMPRESSORS:-}" -export MONGODB_API_VERSION="${MONGODB_API_VERSION:-}" -export skip_crypt_shared="${skip_crypt_shared:-}" -export STORAGE_ENGINE="${STORAGE_ENGINE:-}" -export REQUIRE_API_VERSION="${REQUIRE_API_VERSION:-}" export skip_web_identity_auth_test="${skip_web_identity_auth_test:-}" export skip_ECS_auth_test="${skip_ECS_auth_test:-}" @@ -96,14 +83,8 @@ SKIP_LEGACY_SHELL=1 DRIVERS_TOOLS="$DRIVERS_TOOLS" MONGO_ORCHESTRATION_HOME="$MONGO_ORCHESTRATION_HOME" MONGODB_BINARIES="$MONGODB_BINARIES" -TMPDIR="$MONGO_ORCHESTRATION_HOME/db" EOT -# Skip CSOT tests on non-linux platforms. -if [ "$(uname -s)" != "Linux" ]; then - echo "export SKIP_CSOT_TESTS=1" >> $SCRIPT_DIR/env.sh -fi - # Add these expansions to make it easier to call out tests scripts from the EVG yaml cat < expansion.yml DRIVERS_TOOLS: "$DRIVERS_TOOLS" diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 59c3c720bf..3c4a687ef9 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -344,11 +344,11 @@ def create_encryption_variants() -> list[BuildVariant]: batchtime = BATCHTIME_WEEK def get_encryption_expansions(encryption): - expansions = dict(TEST_ENCRYPTION="true") + expansions = dict(TEST_NAME="encryption") if "crypt_shared" in encryption: expansions["TEST_CRYPT_SHARED"] = "true" if "PyOpenSSL" in encryption: - expansions["TEST_ENCRYPTION_PYOPENSSL"] = "true" + expansions["SUB_TEST_NAME"] = "pyopenssl" return expansions host = DEFAULT_HOST @@ -487,7 +487,7 @@ def create_enterprise_auth_variants(): def create_pyopenssl_variants(): base_name = "PyOpenSSL" batchtime = BATCHTIME_WEEK - expansions = dict(TEST_PYOPENSSL="true") + expansions = dict(TEST_NAME="pyopenssl") variants = [] for python in ALL_PYTHONS: @@ -645,7 +645,7 @@ def create_disable_test_commands_variants(): def create_serverless_variants(): host = DEFAULT_HOST batchtime = BATCHTIME_WEEK - expansions = dict(TEST_SERVERLESS="true", AUTH="auth", SSL="ssl") + expansions = dict(TEST_NAME="serverless", AUTH="auth", SSL="ssl") tasks = ["serverless_task_group"] base_name = "Serverless" return [ @@ -811,19 +811,14 @@ def create_server_tasks(): SSL=ssl, ) bootstrap_func = FunctionCall(func="bootstrap mongo-orchestration", vars=bootstrap_vars) - test_suites = "" + test_vars = dict(AUTH=auth, SSL=ssl, SYNC=sync) if sync == "sync": - test_suites = "default" + test_vars["TEST_NAME"] = "default" elif sync == "async": - test_suites = "default_async" - test_vars = dict( - AUTH=auth, - SSL=ssl, - SYNC=sync, - TEST_SUITES=test_suites, - ) + test_vars["TEST_NAME"] = "default_async" test_func = FunctionCall(func="run tests", vars=test_vars) tasks.append(EvgTask(name=name, tags=tags, commands=[bootstrap_func, test_func])) + return tasks @@ -834,9 +829,10 @@ def create_load_balancer_tasks(): tags = ["load-balancer", auth, ssl] bootstrap_vars = dict(TOPOLOGY="sharded_cluster", AUTH=auth, SSL=ssl, LOAD_BALANCER="true") bootstrap_func = FunctionCall(func="bootstrap mongo-orchestration", vars=bootstrap_vars) - test_vars = dict(AUTH=auth, SSL=ssl, TEST_LOADBALANCER="true") + test_vars = dict(AUTH=auth, SSL=ssl, TEST_NAME="load_balancer") test_func = FunctionCall(func="run tests", vars=test_vars) tasks.append(EvgTask(name=name, tags=tags, commands=[bootstrap_func, test_func])) + return tasks diff --git a/.evergreen/scripts/run-atlas-tests.sh b/.evergreen/scripts/run-atlas-tests.sh index e5684b7cb4..5f9d447c3d 100755 --- a/.evergreen/scripts/run-atlas-tests.sh +++ b/.evergreen/scripts/run-atlas-tests.sh @@ -4,5 +4,5 @@ set +x set -o errexit bash "${DRIVERS_TOOLS}"/.evergreen/auth_aws/setup_secrets.sh drivers/atlas_connect -TEST_ATLAS=1 bash "${PROJECT_DIRECTORY}"/.evergreen/just.sh setup-test +bash "${PROJECT_DIRECTORY}"/.evergreen/just.sh setup-test atlas bash "${PROJECT_DIRECTORY}"/.evergreen/just.sh test-eg diff --git a/.evergreen/scripts/run-gcpkms-fail-test.sh b/.evergreen/scripts/run-gcpkms-fail-test.sh index 61f5e30ccc..db0b2481b5 100755 --- a/.evergreen/scripts/run-gcpkms-fail-test.sh +++ b/.evergreen/scripts/run-gcpkms-fail-test.sh @@ -4,5 +4,5 @@ HERE=$(dirname ${BASH_SOURCE:-$0}) . $HERE/env.sh export PYTHON_BINARY=/opt/mongodbtoolchain/v4/bin/python3 export LIBMONGOCRYPT_URL=https://s3.amazonaws.com/mciuploads/libmongocrypt/debian11/master/latest/libmongocrypt.tar.gz -SUCCESS=false TEST_FLE_GCP_AUTO=1 bash $HERE/setup-tests.sh +SUCCESS=false bash $HERE/setup-tests.sh kms gcp bash ./.evergreen/just.sh test-eg diff --git a/.evergreen/scripts/run-mockupdb-tests.sh b/.evergreen/scripts/run-mockupdb-tests.sh deleted file mode 100755 index 32594f05d3..0000000000 --- a/.evergreen/scripts/run-mockupdb-tests.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -set -o xtrace -export PYTHON_BINARY=${PYTHON_BINARY} -bash "${PROJECT_DIRECTORY}"/.evergreen/just.sh test-mockupdb diff --git a/.evergreen/scripts/run-mongodb-aws-test.sh b/.evergreen/scripts/run-mongodb-aws-test.sh index 255f84f295..d3d801a6d4 100755 --- a/.evergreen/scripts/run-mongodb-aws-test.sh +++ b/.evergreen/scripts/run-mongodb-aws-test.sh @@ -24,5 +24,5 @@ echo "Running MONGODB-AWS authentication tests for $1" # Handle credentials and environment setup. . "$DRIVERS_TOOLS"/.evergreen/auth_aws/aws_setup.sh "$1" -TEST_AUTH_AWS=1 AUTH="auth" bash ./.evergreen/just.sh setup-test +AUTH="auth" bash ./.evergreen/just.sh setup-test auth_aws bash ./.evergreen/just.sh test-eg diff --git a/.evergreen/scripts/run-ocsp-test.sh b/.evergreen/scripts/run-ocsp-test.sh index 2b9cbd476d..1aebed58de 100755 --- a/.evergreen/scripts/run-ocsp-test.sh +++ b/.evergreen/scripts/run-ocsp-test.sh @@ -1,9 +1,11 @@ #!/bin/bash -TEST_OCSP=1 \ -PYTHON_BINARY="${PYTHON_BINARY}" \ +pushd "${PROJECT_DIRECTORY}/.evergreen" +bash scripts/setup-dev-env.sh CA_FILE="${DRIVERS_TOOLS}/.evergreen/ocsp/${OCSP_ALGORITHM}/ca.pem" \ -OCSP_TLS_SHOULD_SUCCEED="${OCSP_TLS_SHOULD_SUCCEED}" \ -bash "${PROJECT_DIRECTORY}"/.evergreen/just.sh setup-test -bash "${PROJECT_DIRECTORY}"/.evergreen/just.sh test-eg + OCSP_TLS_SHOULD_SUCCEED="${OCSP_TLS_SHOULD_SUCCEED}" \ + bash scripts/setup-tests.sh ocsp +bash run-tests.sh bash "${DRIVERS_TOOLS}"/.evergreen/ocsp/teardown.sh + +popd diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index 4e14ff9830..4704d55d1c 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -1,5 +1,6 @@ from __future__ import annotations +import argparse import base64 import logging import os @@ -19,60 +20,49 @@ logging.basicConfig(level=logging.INFO) LOGGER = logging.getLogger(__name__) -EXPECTED_VARS = [ - "TEST_ENCRYPTION", - "TEST_ENCRYPTION_PYOPENSSL", - "TEST_CRYPT_SHARED", - "TEST_PYOPENSSL", - "TEST_LOAD_BALANCER", - "TEST_SERVERLESS", - "TEST_INDEX_MANAGEMENT", - "TEST_ENTERPRISE_AUTH", - "TEST_FLE_AZURE_AUTO", - "TEST_FLE_GCP_AUTO", - "TEST_LOADBALANCER", - "TEST_DATA_LAKE", - "TEST_ATLAS", - "TEST_OCSP", - "TEST_AUTH_AWS", - "TEST_AUTH_OIDC", - "COMPRESSORS", - "MONGODB_URI", - "PERF_TEST", +# Passthrough environment variables. +PASS_THROUGH_ENV = [ "GREEN_FRAMEWORK", - "PYTHON_BINARY", - "LIBMONGOCRYPT_URL", + "NO_EXT", + "SETDEFAULTENCODING", + "MONGODB_API_VERSION", + "MONGODB_URI", ] -# Handle the test suite based on the presence of env variables. +# Map the test name to a test suite. TEST_SUITE_MAP = dict( - TEST_DATA_LAKE="data_lake", - TEST_AUTH_OIDC="auth_oidc", - TEST_INDEX_MANAGEMENT="index_management", - TEST_ENTERPRISE_AUTH="auth", - TEST_LOADBALANCER="load_balancer", - TEST_ENCRYPTION="encryption", - TEST_FLE_AZURE_AUTO="csfle", - TEST_FLE_GCP_AUTO="csfle", - TEST_ATLAS="atlas", - TEST_OCSP="ocsp", - TEST_AUTH_AWS="auth_aws", - PERF_TEST="perf", + default="default or default_async", + default_sync="default", + default_async="default_async", + serverless="default or default_async", + data_lake="data_lake", + auth_oidc="auth_oidc", + index_management="index_management", + enterprise_auth="auth", + load_balancer="load_balancer", + encryption="encryption", + kms="csfle", + atlas="atlas", + ocsp="ocsp", + auth_aws="auth_aws", + perf="perf", + mockupdb="mockupdb", ) -# Handle extras based on the presence of env variables. +# Map the test name to test extra. EXTRAS_MAP = dict( - TEST_AUTH_OIDC="aws", - TEST_AUTH_AWS="aws", - TEST_OCSP="ocsp", - TEST_PYOPENSSL="ocsp", - TEST_ENTERPRISE_AUTH="gssapi", - TEST_ENCRYPTION="encryption", - TEST_FLE_AZURE_AUTO="encryption", - TEST_FLE_GCP_AUTO="encryption", - TEST_ENCRYPTION_PYOPENSSL="ocsp", + auth_oidc="aws", + auth_aws="aws", + ocsp="ocsp", + pyopenssl="ocsp", + enterprise_auth="gssapi", + encryption="encryption", + kms="encryption", ) +# Map the test name to test group. +GROUP_MAP = dict(mockupdb="mockupdb", perf="perf") + def write_env(name: str, value: Any) -> None: with ENV_FILE.open("a", newline="\n") as fid: @@ -92,56 +82,102 @@ def run_command(cmd: str) -> None: LOGGER.info("Running command %s... done.", cmd) +def read_env(path: Path) -> dict[str, Any]: + config = dict() + with path.open() as fid: + for line in fid.readlines(): + if "=" not in line: + continue + name, _, value = line.partition("=") + if value.startswith(('"', "'")): + value = value[1:-1] + config[name] = value + return config + + +def get_options(): + parser = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument("test_name", choices=sorted(TEST_SUITE_MAP), default="default") + parser.add_argument("sub_test_name") + parser.add_argument( + "--verbose", "-v", action="store_true", help="Whether to log at the DEBUG level" + ) + parser.add_argument( + "--quiet", "-q", action="store_true", help="Whether to log at the WARNING level" + ) + parser.add_argument("--auth", action="store_true", help="Whether to add authentication") + parser.add_argument("--ssl", action="store_true", help="Whether to add TLS configuration") + # Get the options. + opts = parser.parse_args() + if opts.verbose: + LOGGER.setLevel(logging.DEBUG) + elif opts.quiet: + LOGGER.setLevel(logging.WARNING) + return opts + + def handle_test_env() -> None: + opts = get_options() + test_name = opts.test_name + sub_test_name = opts.sub_test_name AUTH = os.environ.get("AUTH", "noauth") + if opts.auth: + AUTH = "auth" SSL = os.environ.get("SSL", "nossl") - TEST_SUITES = os.environ.get("TEST_SUITES", "") + if opts.ssl: + AUTH = "ssl" TEST_ARGS = "" # Start compiling the args we'll pass to uv. # Run in an isolated environment so as not to pollute the base venv. UV_ARGS = ["--isolated --extra test"] - # Save variables in EXPECTED_VARS that have values. + # Create the test env file with the initial set of values. with ENV_FILE.open("w", newline="\n") as fid: fid.write("#!/usr/bin/env bash\n") fid.write("set +x\n") - fid.write(f"export AUTH={AUTH}\n") - fid.write(f"export SSL={SSL}\n") - for var in EXPECTED_VARS: - value = os.environ.get(var, "") - # Remove any existing quote chars. - value = value.replace('"', "") - if value: - fid.write(f'export {var}="{value}"\n') ENV_FILE.chmod(ENV_FILE.stat().st_mode | stat.S_IEXEC) - for env_var, extra in EXTRAS_MAP.items(): - if env_var in os.environ: - UV_ARGS.append(f"--extra {extra}") + write_env("AUTH", AUTH) + write_env("SSL", SSL) + # Skip CSOT tests on non-linux platforms. + if sys.platform != "Linux": + write_env("SKIP_CSOT_TESTS") + # Set an environment variable for the test name. + write_env(f"TEST_{test_name.upper()}") + # Handle pass through env vars. + for var in PASS_THROUGH_ENV: + if is_set(var): + write_env(var, os.environ[var]) - for env_var, suite in TEST_SUITE_MAP.items(): - if TEST_SUITES: - break - if env_var in os.environ: - TEST_SUITES = suite + if extra := EXTRAS_MAP.get(test_name, ""): + UV_ARGS.append(f"--extra {extra}") + + if group := GROUP_MAP.get(test_name, ""): + UV_ARGS.append(f"--group {group}") if AUTH != "noauth": - if is_set("TEST_DATA_LAKE"): - DB_USER = os.environ["ADL_USERNAME"] - DB_PASSWORD = os.environ["ADL_PASSWORD"] - elif is_set("TEST_SERVERLESS"): - DB_USER = os.environ("SERVERLESS_ATLAS_USER") - DB_PASSWORD = os.environ("SERVERLESS_ATLAS_PASSWORD") - write_env("MONGODB_URI", os.environ("SERVERLESS_URI")) - write_env("SINGLE_MONGOS_LB_URI", os.environ("SERVERLESS_URI")) - write_env("MULTI_MONGOS_LB_URI", os.environ("SERVERLESS_URI")) - elif is_set("TEST_AUTH_OIDC"): - DB_USER = os.environ["OIDC_ADMIN_USER"] - DB_PASSWORD = os.environ["OIDC_ADMIN_PWD"] - write_env("DB_IP", os.environ["MONGODB_URI"]) - elif is_set("TEST_INDEX_MANAGEMENT"): - DB_USER = os.environ["DRIVERS_ATLAS_LAMBDA_USER"] - DB_PASSWORD = os.environ["DRIVERS_ATLAS_LAMBDA_PASSWORD"] + if test_name == "data_lake": + config = read_env(f"{DRIVERS_TOOLS}/.evergreen/atlas_data_lake/secrets-export.sh") + DB_USER = config("ADL_USERNAME") + DB_PASSWORD = config("ADL_PASSWORD") + elif test_name == "serverless": + config = read_env(f"{DRIVERS_TOOLS}/.evergreen/serverless/secrets-export.sh") + DB_USER = config("SERVERLESS_ATLAS_USER") + DB_PASSWORD = config("SERVERLESS_ATLAS_PASSWORD") + write_env("MONGODB_URI", config("SERVERLESS_URI")) + write_env("SINGLE_MONGOS_LB_URI", config("SERVERLESS_URI")) + write_env("MULTI_MONGOS_LB_URI", config("SERVERLESS_URI")) + elif test_name == "auth_oidc": + config = read_env(f"{DRIVERS_TOOLS}/.evergreen/auth_oidc/secrets-export.sh") + DB_USER = config("OIDC_ADMIN_USER") + DB_PASSWORD = config("OIDC_ADMIN_PWD") + write_env("DB_IP", config("MONGODB_URI")) + elif test_name == "index_management": + config = read_env(f"{DRIVERS_TOOLS}/.evergreen/atlas/secrets-export.sh") + DB_USER = config("DRIVERS_ATLAS_LAMBDA_USER") + DB_PASSWORD = config("DRIVERS_ATLAS_LAMBDA_PASSWORD") else: DB_USER = "bob" DB_PASSWORD = "pwd123" # noqa: S105 @@ -155,7 +191,7 @@ def handle_test_env() -> None: if is_set("DISABLE_TEST_COMMANDS"): write_env("PYMONGO_DISABLE_TEST_COMMANDS", "1") - if is_set("TEST_ENTERPRISE_AUTH"): + if test_name == "enterprise_auth": if os.name == "nt": LOGGER.info("Setting GSSAPI_PASS") write_env("GSSAPI_PASS", os.environ["SASL_PASS"]) @@ -181,8 +217,7 @@ def handle_test_env() -> None: write_env("GSSAPI_PORT", os.environ["SASL_PORT"]) write_env("GSSAPI_PRINCIPAL", os.environ["PRINCIPAL"]) - if is_set("TEST_LOADBALANCER"): - write_env("LOAD_BALANCER", "1") + if test_name == "load_balancer": SINGLE_MONGOS_LB_URI = os.environ.get( "SINGLE_MONGOS_LB_URI", "mongodb://127.0.0.1:8000/?loadBalanced=true" ) @@ -211,7 +246,7 @@ def handle_test_env() -> None: elif compressors == "zstd": UV_ARGS.append("--extra zstandard") - if is_set("TEST_ENCRYPTION") or is_set("TEST_FLE_AZURE_AUTO") or is_set("TEST_FLE_GCP_AUTO"): + if test_name in ["encryption", "kms"]: # Check for libmongocrypt download. if not (ROOT / "libmongocrypt").exists(): run_command(f"bash {HERE.as_posix()}/setup-libmongocrypt.sh") @@ -235,12 +270,15 @@ def handle_test_env() -> None: write_env("PYMONGOCRYPT_LIB", PYMONGOCRYPT_LIB.as_posix()) # PATH is updated by configure-env.sh for access to mongocryptd. - if is_set("TEST_ENCRYPTION"): + if test_name == "encryption": if not DRIVERS_TOOLS: raise RuntimeError("Missing DRIVERS_TOOLS") run_command(f"bash {DRIVERS_TOOLS}/.evergreen/csfle/setup-secrets.sh") run_command(f"bash {DRIVERS_TOOLS}/.evergreen/csfle/start-servers.sh") + if sub_test_name == "pyopenssl": + UV_ARGS.append("--extra ocsp") + if is_set("TEST_CRYPT_SHARED"): CRYPT_SHARED_DIR = Path(os.environ["CRYPT_SHARED_LIB_PATH"]).parent.as_posix() LOGGER.info("Using crypt_shared_dir %s", CRYPT_SHARED_DIR) @@ -253,21 +291,25 @@ def handle_test_env() -> None: ) write_env("LD_LIBRARY_PATH", f"{CRYPT_SHARED_DIR}:${{LD_LIBRARY_PATH:-}}") - if is_set("TEST_FLE_AZURE_AUTO") or is_set("TEST_FLE_GCP_AUTO"): + if test_name == "kms": if "SUCCESS" not in os.environ: raise RuntimeError("Must define SUCCESS") + if sub_test_name == "azure": + write_env("TEST_FLE_AZURE_AUTO") + else: + write_env("TEST_FLE_GCP_AUTO") + write_env("SUCCESS", os.environ["SUCCESS"]) MONGODB_URI = os.environ.get("MONGODB_URI", "") if "@" in MONGODB_URI: raise RuntimeError("MONGODB_URI unexpectedly contains user credentials in FLE test!") - if is_set("TEST_OCSP"): + if test_name == "ocsp": write_env("CA_FILE", os.environ["CA_FILE"]) write_env("OCSP_TLS_SHOULD_SUCCEED", os.environ["OCSP_TLS_SHOULD_SUCCEED"]) - if is_set("PERF_TEST"): - UV_ARGS.append("--group perf") + if test_name == "perf": # PYTHON-4769 Run perf_test.py directly otherwise pytest's test collection negatively # affects the benchmark results. TEST_ARGS = f"test/performance/perf_test.py {TEST_ARGS}" @@ -279,17 +321,19 @@ def handle_test_env() -> None: # coverage >=5 is needed for relative_files=true. UV_ARGS.append("--group coverage") TEST_ARGS = f"{TEST_ARGS} --cov" + write_env("COVERAGE") if is_set("GREEN_FRAMEWORK"): framework = os.environ["GREEN_FRAMEWORK"] + write_env("GREEN_FRAMEWORK", framework) UV_ARGS.append(f"--group {framework}") else: # Use --capture=tee-sys so pytest prints test output inline: # https://docs.pytest.org/en/stable/how-to/capture-stdout-stderr.html TEST_ARGS = f"-v --capture=tee-sys --durations=5 {TEST_ARGS}" - if TEST_SUITES: - TEST_ARGS = f"-m {TEST_SUITES} {TEST_ARGS}" + TEST_SUITES = TEST_SUITE_MAP[test_name] + TEST_ARGS = f'-m "{TEST_SUITES}" {TEST_ARGS}' write_env("TEST_ARGS", TEST_ARGS) write_env("UV_ARGS", " ".join(UV_ARGS)) diff --git a/.evergreen/scripts/setup-tests.sh b/.evergreen/scripts/setup-tests.sh index 80fc717047..766df6f1ba 100755 --- a/.evergreen/scripts/setup-tests.sh +++ b/.evergreen/scripts/setup-tests.sh @@ -8,25 +8,10 @@ set -eu # COVERAGE If non-empty, run the test suite with coverage. # COMPRESSORS If non-empty, install appropriate compressor. # LIBMONGOCRYPT_URL The URL to download libmongocrypt. -# TEST_DATA_LAKE If non-empty, run data lake tests. -# TEST_ENCRYPTION If non-empty, run encryption tests. # TEST_CRYPT_SHARED If non-empty, install crypt_shared lib. -# TEST_SERVERLESS If non-empy, test on serverless. -# TEST_LOADBALANCER If non-empy, test load balancing. -# TEST_FLE_AZURE_AUTO If non-empy, test auto FLE on Azure -# TEST_FLE_GCP_AUTO If non-empy, test auto FLE on GCP -# TEST_PYOPENSSL If non-empy, test with PyOpenSSL -# TEST_ENTERPRISE_AUTH If non-empty, test with Enterprise Auth -# TEST_AUTH_AWS If non-empty, test AWS Auth Mechanism -# TEST_AUTH_OIDC If non-empty, test OIDC Auth Mechanism -# TEST_PERF If non-empty, run performance tests -# TEST_OCSP If non-empty, run OCSP tests -# TEST_ATLAS If non-empty, test Atlas connections -# TEST_INDEX_MANAGEMENT If non-empty, run index management tests -# TEST_ENCRYPTION_PYOPENSSL If non-empy, test encryption with PyOpenSSL -# PERF_TEST If non-empty, run the performance tests. +# SETDEFAULTENCODING Whether to set default encoding in tests. +# MONGODB_API_VERSION The mongodb api version to use in tests. # MONGODB_URI If non-empty, use as the MONGODB_URI in tests. -# PYTHON_BINARY The python binary to use in tests. SCRIPT_DIR=$(dirname ${BASH_SOURCE:-$0}) ROOT_DIR="$(dirname "$(dirname $SCRIPT_DIR)")" @@ -36,26 +21,4 @@ if [ -f $SCRIPT_DIR/env.sh ]; then source $SCRIPT_DIR/env.sh fi -# Source serverless secrets if applicable. -if [ -n "${TEST_SERVERLESS:-}" ]; then - source $DRIVERS_TOOLS/.evergreen/serverless/secrets-export.sh -fi - -# Source atlas secrets if applicable. -if [ -n "${TEST_INDEX_MANAGEMENT:-}" ]; then - source $DRIVERS_TOOLS/.evergreen/atlas/secrets-export.sh -fi - -# Source ADL secrets if applicable. -if [ -n "${TEST_DATA_LAKE:-}" ]; then - source ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/secrets-export.sh -fi - -# Source local secrets if applicable. -if [ -f "$ROOT_DIR/secrets-export.sh" ]; then - source "$ROOT_DIR/secrets-export.sh" -fi - -. $ROOT_DIR/.evergreen/utils.sh -PYTHON=${PYTHON_BINARY:-$(find_python3)} -$PYTHON $SCRIPT_DIR/setup-tests.py +python $SCRIPT_DIR/setup-tests.py $@ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ce5bebf181..0b8b77fc6e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -212,7 +212,7 @@ the pages will re-render and the browser will automatically refresh. - Start the servers using `LOAD_BALANCER=true TOPOLOGY=sharded_cluster AUTH=noauth SSL=nossl MONGODB_VERSION=6.0 DRIVERS_TOOLS=$PWD/drivers-evergreen-tools MONGO_ORCHESTRATION_HOME=$PWD/drivers-evergreen-tools/.evergreen/orchestration $PWD/drivers-evergreen-tools/.evergreen/run-orchestration.sh`. - Set up the test using: - `MONGODB_URI='mongodb://localhost:27017,localhost:27018/' TEST_LOADBALANCER=1 just setup-test`. + `MONGODB_URI='mongodb://localhost:27017,localhost:27018/' just setup-test load-balancer`. - Run the tests from the `pymongo` checkout directory using: `just test-eg`. @@ -220,7 +220,7 @@ the pages will re-render and the browser will automatically refresh. - Clone `drivers-evergreen-tools`: `git clone git@github.com:mongodb-labs/drivers-evergreen-tools.git`. - Run `export DRIVERS_TOOLS=$PWD/drivers-evergreen-tools` -- Run `TEST_ENCRYPTION=1 AWS_PROFILE= just setup-test` after setting up your AWS profile with `aws configure sso`. +- Run `AWS_PROFILE= just setup-test encryption` after setting up your AWS profile with `aws configure sso`. - Run the tests with `just test-eg`. - When done, run `just teardown-test` to clean up. diff --git a/justfile b/justfile index 3840484bc5..5de578ecc7 100644 --- a/justfile +++ b/justfile @@ -60,17 +60,13 @@ lint-manual: test *args="-v --durations=5 --maxfail=10": {{uv_run}} --extra test pytest {{args}} -[group('test')] -test-mockupdb *args: - {{uv_run}} -v --extra test --group mockupdb pytest -m mockupdb {{args}} - [group('test')] test-eg *args: bash ./.evergreen/run-tests.sh {{args}} [group('test')] -setup-test: - bash .evergreen/scripts/setup-tests.sh +setup-test *args="": + bash .evergreen/scripts/setup-tests.sh {{args}} [group('test')] teardown-test: diff --git a/test/asynchronous/test_client_context.py b/test/asynchronous/test_client_context.py index 6a195eb6b8..611186d28b 100644 --- a/test/asynchronous/test_client_context.py +++ b/test/asynchronous/test_client_context.py @@ -47,12 +47,12 @@ def test_serverless(self): ) def test_enableTestCommands_is_disabled(self): - if not os.environ.get("PYMONGO_DISABLE_TEST_COMMANDS"): - raise SkipTest("PYMONGO_DISABLE_TEST_COMMANDS is not set") + if not os.environ.get("DISABLE_TEST_COMMANDS"): + raise SkipTest("DISABLE_TEST_COMMANDS is not set") self.assertFalse( async_client_context.test_commands_enabled, - "enableTestCommands must be disabled when PYMONGO_DISABLE_TEST_COMMANDS is set.", + "enableTestCommands must be disabled when DISABLE_TEST_COMMANDS is set.", ) def test_setdefaultencoding_worked(self): diff --git a/test/asynchronous/test_data_lake.py b/test/asynchronous/test_data_lake.py index 0b259fb0d0..e67782ad3f 100644 --- a/test/asynchronous/test_data_lake.py +++ b/test/asynchronous/test_data_lake.py @@ -38,10 +38,6 @@ class TestDataLakeMustConnect(AsyncUnitTest): async def test_connected_to_data_lake(self): - data_lake = os.environ.get("TEST_DATA_LAKE") - if not data_lake: - self.skipTest("TEST_DATA_LAKE is not set") - self.assertTrue( async_client_context.is_data_lake and async_client_context.connected, "client context must be connected to data lake when DATA_LAKE is set. Failed attempts:\n{}".format( diff --git a/test/asynchronous/test_index_management.py b/test/asynchronous/test_index_management.py index 2920c48b2f..c155047089 100644 --- a/test/asynchronous/test_index_management.py +++ b/test/asynchronous/test_index_management.py @@ -51,8 +51,6 @@ class TestCreateSearchIndex(AsyncIntegrationTest): async def test_inputs(self): - if not os.environ.get("TEST_INDEX_MANAGEMENT"): - raise unittest.SkipTest("Skipping index management tests") listener = AllowListEventListener("createSearchIndexes") client = self.simple_client(event_listeners=[listener]) coll = client.test.test @@ -90,8 +88,6 @@ class SearchIndexIntegrationBase(AsyncPyMongoTestCase): @classmethod def setUpClass(cls) -> None: - if not os.environ.get("TEST_INDEX_MANAGEMENT"): - raise unittest.SkipTest("Skipping index management tests") cls.url = os.environ.get("MONGODB_URI") cls.username = os.environ["DB_USER"] cls.password = os.environ["DB_PASSWORD"] diff --git a/test/test_client_context.py b/test/test_client_context.py index e807ac5f5f..e0279c763c 100644 --- a/test/test_client_context.py +++ b/test/test_client_context.py @@ -47,12 +47,12 @@ def test_serverless(self): ) def test_enableTestCommands_is_disabled(self): - if not os.environ.get("PYMONGO_DISABLE_TEST_COMMANDS"): - raise SkipTest("PYMONGO_DISABLE_TEST_COMMANDS is not set") + if not os.environ.get("DISABLE_TEST_COMMANDS"): + raise SkipTest("DISABLE_TEST_COMMANDS is not set") self.assertFalse( client_context.test_commands_enabled, - "enableTestCommands must be disabled when PYMONGO_DISABLE_TEST_COMMANDS is set.", + "enableTestCommands must be disabled when DISABLE_TEST_COMMANDS is set.", ) def test_setdefaultencoding_worked(self): diff --git a/test/test_data_lake.py b/test/test_data_lake.py index 797ef85000..c8b76eb1ca 100644 --- a/test/test_data_lake.py +++ b/test/test_data_lake.py @@ -38,10 +38,6 @@ class TestDataLakeMustConnect(UnitTest): def test_connected_to_data_lake(self): - data_lake = os.environ.get("TEST_DATA_LAKE") - if not data_lake: - self.skipTest("TEST_DATA_LAKE is not set") - self.assertTrue( client_context.is_data_lake and client_context.connected, "client context must be connected to data lake when DATA_LAKE is set. Failed attempts:\n{}".format( diff --git a/test/test_index_management.py b/test/test_index_management.py index 5135e43f1f..e4b931cf00 100644 --- a/test/test_index_management.py +++ b/test/test_index_management.py @@ -51,8 +51,6 @@ class TestCreateSearchIndex(IntegrationTest): def test_inputs(self): - if not os.environ.get("TEST_INDEX_MANAGEMENT"): - raise unittest.SkipTest("Skipping index management tests") listener = AllowListEventListener("createSearchIndexes") client = self.simple_client(event_listeners=[listener]) coll = client.test.test @@ -90,8 +88,6 @@ class SearchIndexIntegrationBase(PyMongoTestCase): @classmethod def setUpClass(cls) -> None: - if not os.environ.get("TEST_INDEX_MANAGEMENT"): - raise unittest.SkipTest("Skipping index management tests") cls.url = os.environ.get("MONGODB_URI") cls.username = os.environ["DB_USER"] cls.password = os.environ["DB_PASSWORD"] From 0e815b122d1f48131aaa802f0c4eac79475e05e9 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 15 Feb 2025 21:10:27 -0600 Subject: [PATCH 02/42] regen config --- .evergreen/generated_configs/variants.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.evergreen/generated_configs/variants.yml b/.evergreen/generated_configs/variants.yml index aa0047370a..2399140d77 100644 --- a/.evergreen/generated_configs/variants.yml +++ b/.evergreen/generated_configs/variants.yml @@ -399,7 +399,8 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_NAME: encryption_pyopenssl + TEST_NAME: encryption + SUB_TEST_NAME: pyopenssl PYTHON_BINARY: /opt/python/3.9/bin/python3 tags: [encryption_tag] - name: encryption-pyopenssl-rhel8-python3.13 @@ -412,7 +413,8 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_NAME: encryption_pyopenssl + TEST_NAME: encryption + SUB_TEST_NAME: pyopenssl PYTHON_BINARY: /opt/python/3.13/bin/python3 tags: [encryption_tag] - name: encryption-pyopenssl-rhel8-pypy3.10 @@ -425,7 +427,8 @@ buildvariants: - rhel87-small batchtime: 10080 expansions: - TEST_NAME: encryption_pyopenssl + TEST_NAME: encryption + SUB_TEST_NAME: pyopenssl PYTHON_BINARY: /opt/python/pypy3.10/bin/python3 tags: [encryption_tag] - name: encryption-rhel8-python3.10 @@ -454,7 +457,8 @@ buildvariants: run_on: - rhel87-small expansions: - TEST_NAME: encryption_pyopenssl + TEST_NAME: encryption + SUB_TEST_NAME: pyopenssl PYTHON_BINARY: /opt/python/3.12/bin/python3 - name: encryption-macos-python3.9 tasks: From 62b1d77d2dd4dc22ec12b25ff1b5c4290232591e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 15 Feb 2025 21:15:38 -0600 Subject: [PATCH 03/42] regen config --- .evergreen/generated_configs/tasks.yml | 162 ++++++++++----------- .evergreen/scripts/generate_config.py | 2 +- .evergreen/scripts/run-gcpkms-fail-test.sh | 2 +- 3 files changed, 83 insertions(+), 83 deletions(-) diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 95fa266988..5495ad3470 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -57,7 +57,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.0" - standalone @@ -116,7 +116,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.0" - standalone @@ -175,7 +175,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.0" - standalone @@ -234,7 +234,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.2" - standalone @@ -293,7 +293,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.2" - standalone @@ -352,7 +352,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.2" - standalone @@ -411,7 +411,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.4" - standalone @@ -470,7 +470,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.4" - standalone @@ -529,7 +529,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.4" - standalone @@ -588,7 +588,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "5.0" - standalone @@ -647,7 +647,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "5.0" - standalone @@ -706,7 +706,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "5.0" - standalone @@ -765,7 +765,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "6.0" - standalone @@ -824,7 +824,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "6.0" - standalone @@ -883,7 +883,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "6.0" - standalone @@ -942,7 +942,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "7.0" - standalone @@ -1001,7 +1001,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "7.0" - standalone @@ -1060,7 +1060,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "7.0" - standalone @@ -1119,7 +1119,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "8.0" - standalone @@ -1178,7 +1178,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "8.0" - standalone @@ -1237,7 +1237,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "8.0" - standalone @@ -1296,7 +1296,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - rapid - standalone @@ -1355,7 +1355,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - rapid - standalone @@ -1414,7 +1414,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - rapid - standalone @@ -1473,7 +1473,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - latest - standalone @@ -1532,7 +1532,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - latest - standalone @@ -1591,7 +1591,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - latest - standalone @@ -1650,7 +1650,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.0" - replica_set @@ -1709,7 +1709,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.0" - replica_set @@ -1768,7 +1768,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.0" - replica_set @@ -1827,7 +1827,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.2" - replica_set @@ -1886,7 +1886,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.2" - replica_set @@ -1945,7 +1945,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.2" - replica_set @@ -2004,7 +2004,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.4" - replica_set @@ -2063,7 +2063,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.4" - replica_set @@ -2122,7 +2122,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.4" - replica_set @@ -2181,7 +2181,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "5.0" - replica_set @@ -2240,7 +2240,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "5.0" - replica_set @@ -2299,7 +2299,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "5.0" - replica_set @@ -2358,7 +2358,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "6.0" - replica_set @@ -2417,7 +2417,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "6.0" - replica_set @@ -2476,7 +2476,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "6.0" - replica_set @@ -2535,7 +2535,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "7.0" - replica_set @@ -2594,7 +2594,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "7.0" - replica_set @@ -2653,7 +2653,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "7.0" - replica_set @@ -2712,7 +2712,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "8.0" - replica_set @@ -2771,7 +2771,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "8.0" - replica_set @@ -2830,7 +2830,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "8.0" - replica_set @@ -2889,7 +2889,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - rapid - replica_set @@ -2948,7 +2948,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - rapid - replica_set @@ -3007,7 +3007,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - rapid - replica_set @@ -3066,7 +3066,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - latest - replica_set @@ -3125,7 +3125,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - latest - replica_set @@ -3184,7 +3184,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - latest - replica_set @@ -3243,7 +3243,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.0" - sharded_cluster @@ -3302,7 +3302,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.0" - sharded_cluster @@ -3361,7 +3361,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.0" - sharded_cluster @@ -3420,7 +3420,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.2" - sharded_cluster @@ -3479,7 +3479,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.2" - sharded_cluster @@ -3538,7 +3538,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.2" - sharded_cluster @@ -3597,7 +3597,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.4" - sharded_cluster @@ -3656,7 +3656,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.4" - sharded_cluster @@ -3715,7 +3715,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "4.4" - sharded_cluster @@ -3774,7 +3774,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "5.0" - sharded_cluster @@ -3833,7 +3833,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "5.0" - sharded_cluster @@ -3892,7 +3892,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "5.0" - sharded_cluster @@ -3951,7 +3951,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "6.0" - sharded_cluster @@ -4010,7 +4010,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "6.0" - sharded_cluster @@ -4069,7 +4069,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "6.0" - sharded_cluster @@ -4128,7 +4128,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "7.0" - sharded_cluster @@ -4187,7 +4187,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "7.0" - sharded_cluster @@ -4246,7 +4246,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "7.0" - sharded_cluster @@ -4305,7 +4305,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "8.0" - sharded_cluster @@ -4364,7 +4364,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "8.0" - sharded_cluster @@ -4423,7 +4423,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - "8.0" - sharded_cluster @@ -4482,7 +4482,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - rapid - sharded_cluster @@ -4541,7 +4541,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - rapid - sharded_cluster @@ -4600,7 +4600,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - rapid - sharded_cluster @@ -4659,7 +4659,7 @@ tasks: AUTH: auth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - latest - sharded_cluster @@ -4718,7 +4718,7 @@ tasks: AUTH: noauth SSL: ssl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - latest - sharded_cluster @@ -4777,7 +4777,7 @@ tasks: AUTH: noauth SSL: nossl SYNC: sync - TEST_NAME: default + TEST_NAME: default_sync tags: - latest - sharded_cluster diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 3c4a687ef9..db7b336420 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -813,7 +813,7 @@ def create_server_tasks(): bootstrap_func = FunctionCall(func="bootstrap mongo-orchestration", vars=bootstrap_vars) test_vars = dict(AUTH=auth, SSL=ssl, SYNC=sync) if sync == "sync": - test_vars["TEST_NAME"] = "default" + test_vars["TEST_NAME"] = "default_sync" elif sync == "async": test_vars["TEST_NAME"] = "default_async" test_func = FunctionCall(func="run tests", vars=test_vars) diff --git a/.evergreen/scripts/run-gcpkms-fail-test.sh b/.evergreen/scripts/run-gcpkms-fail-test.sh index db0b2481b5..53a108f66f 100755 --- a/.evergreen/scripts/run-gcpkms-fail-test.sh +++ b/.evergreen/scripts/run-gcpkms-fail-test.sh @@ -4,5 +4,5 @@ HERE=$(dirname ${BASH_SOURCE:-$0}) . $HERE/env.sh export PYTHON_BINARY=/opt/mongodbtoolchain/v4/bin/python3 export LIBMONGOCRYPT_URL=https://s3.amazonaws.com/mciuploads/libmongocrypt/debian11/master/latest/libmongocrypt.tar.gz -SUCCESS=false bash $HERE/setup-tests.sh kms gcp +SUCCESS=false ./.evergreen/just.sh setup-test kms gcp bash ./.evergreen/just.sh test-eg From 0de124df21694bf2d3aa98265000f55dcb6c439b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 16 Feb 2025 09:02:23 -0600 Subject: [PATCH 04/42] cleanup --- .evergreen/run-azurekms-fail-test.sh | 2 +- .evergreen/run-azurekms-test.sh | 2 +- .evergreen/run-gcpkms-test.sh | 2 +- .evergreen/run-mongodb-aws-ecs-test.sh | 1 - .evergreen/run-mongodb-oidc-test.sh | 2 +- .../scripts/run-enterprise-auth-tests.sh | 2 +- .evergreen/scripts/run-gcpkms-fail-test.sh | 2 +- .evergreen/scripts/run-mongodb-aws-test.sh | 2 +- .evergreen/scripts/setup-tests.py | 65 +++++++++---------- .evergreen/scripts/setup-tests.sh | 2 +- 10 files changed, 39 insertions(+), 43 deletions(-) diff --git a/.evergreen/run-azurekms-fail-test.sh b/.evergreen/run-azurekms-fail-test.sh index 6083e66bc6..8a4412c0f5 100755 --- a/.evergreen/run-azurekms-fail-test.sh +++ b/.evergreen/run-azurekms-fail-test.sh @@ -2,7 +2,7 @@ set -o errexit # Exit the script with error if any of the commands fail HERE=$(dirname ${BASH_SOURCE:-$0}) . $DRIVERS_TOOLS/.evergreen/csfle/azurekms/setup-secrets.sh -SUCCESS=false bash $HERE/scripts/setup-tests.sh kms azure +bash $HERE/just.sh setup-test kms azure-fail PYTHON_BINARY=/opt/mongodbtoolchain/v4/bin/python3 \ KEY_NAME="${AZUREKMS_KEYNAME}" \ KEY_VAULT_ENDPOINT="${AZUREKMS_KEYVAULTENDPOINT}" \ diff --git a/.evergreen/run-azurekms-test.sh b/.evergreen/run-azurekms-test.sh index 1ac6c4b26c..e9179cfffe 100755 --- a/.evergreen/run-azurekms-test.sh +++ b/.evergreen/run-azurekms-test.sh @@ -20,7 +20,7 @@ AZUREKMS_CMD="tar xf mongo-python-driver.tgz" \ $DRIVERS_TOOLS/.evergreen/csfle/azurekms/run-command.sh echo "Untarring file ... end" echo "Running test ... begin" -AZUREKMS_CMD="SUCCESS=true LIBMONGOCRYPT_URL=$LIBMONGOCRYPT_URL bash .evergreen/just.sh setup-test kms azure" \ +AZUREKMS_CMD="LIBMONGOCRYPT_URL=$LIBMONGOCRYPT_URL bash .evergreen/just.sh setup-test kms azure" \ $DRIVERS_TOOLS/.evergreen/csfle/azurekms/run-command.sh AZUREKMS_CMD="KEY_NAME=\"$AZUREKMS_KEYNAME\" KEY_VAULT_ENDPOINT=\"$AZUREKMS_KEYVAULTENDPOINT\" bash ./.evergreen/just.sh test-eg" \ $DRIVERS_TOOLS/.evergreen/csfle/azurekms/run-command.sh diff --git a/.evergreen/run-gcpkms-test.sh b/.evergreen/run-gcpkms-test.sh index 40b587f117..9a7d011e5d 100755 --- a/.evergreen/run-gcpkms-test.sh +++ b/.evergreen/run-gcpkms-test.sh @@ -19,7 +19,7 @@ echo "Untarring file ... begin" GCPKMS_CMD="tar xf mongo-python-driver.tgz" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh echo "Untarring file ... end" echo "Running test ... begin" -GCPKMS_CMD="SUCCESS=true LIBMONGOCRYPT_URL=$LIBMONGOCRYPT_URL bash ./.evergreen/just.sh setup-test kms gcp" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh +GCPKMS_CMD="LIBMONGOCRYPT_URL=$LIBMONGOCRYPT_URL bash ./.evergreen/just.sh setup-test kms gcp" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh GCPKMS_CMD="./.evergreen/just.sh test-eg" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh echo "Running test ... end" bash $HERE/scripts/teardown-tests.sh diff --git a/.evergreen/run-mongodb-aws-ecs-test.sh b/.evergreen/run-mongodb-aws-ecs-test.sh index 2f06c1eba2..66ec4b82e5 100755 --- a/.evergreen/run-mongodb-aws-ecs-test.sh +++ b/.evergreen/run-mongodb-aws-ecs-test.sh @@ -26,7 +26,6 @@ apt-get -qq update < /dev/null > /dev/null apt-get -qq install $PYTHON_VER $PYTHON_VER-venv build-essential $PYTHON_VER-dev -y < /dev/null > /dev/null export PYTHON_BINARY=$PYTHON_VER -export AUTH="auth" export SET_XTRACE_ON=1 cd src rm -rf .venv diff --git a/.evergreen/run-mongodb-oidc-test.sh b/.evergreen/run-mongodb-oidc-test.sh index 5d3ca65979..c789d6d147 100755 --- a/.evergreen/run-mongodb-oidc-test.sh +++ b/.evergreen/run-mongodb-oidc-test.sh @@ -29,5 +29,5 @@ else exit 1 fi -COVERAGE=1 AUTH="auth" bash ./.evergreen/just.sh setup-test auth_oidc +COVERAGE=1 bash ./.evergreen/just.sh setup-test auth_oidc bash ./.evergreen/just.sh test-eg "${@:1}" diff --git a/.evergreen/scripts/run-enterprise-auth-tests.sh b/.evergreen/scripts/run-enterprise-auth-tests.sh index 6c300325d2..f4656cba9e 100755 --- a/.evergreen/scripts/run-enterprise-auth-tests.sh +++ b/.evergreen/scripts/run-enterprise-auth-tests.sh @@ -5,5 +5,5 @@ set -eu set +x # Use the default python to bootstrap secrets. bash "${DRIVERS_TOOLS}"/.evergreen/secrets_handling/setup-secrets.sh drivers/enterprise_auth -TEST_ENTERPRISE_AUTH=1 AUTH=auth bash "${PROJECT_DIRECTORY}"/.evergreen/just.sh setup-test +bash "${PROJECT_DIRECTORY}"/.evergreen/just.sh setup-test enterprise-auth bash "${PROJECT_DIRECTORY}"/.evergreen/just.sh test-eg diff --git a/.evergreen/scripts/run-gcpkms-fail-test.sh b/.evergreen/scripts/run-gcpkms-fail-test.sh index 53a108f66f..1e7999ea9b 100755 --- a/.evergreen/scripts/run-gcpkms-fail-test.sh +++ b/.evergreen/scripts/run-gcpkms-fail-test.sh @@ -4,5 +4,5 @@ HERE=$(dirname ${BASH_SOURCE:-$0}) . $HERE/env.sh export PYTHON_BINARY=/opt/mongodbtoolchain/v4/bin/python3 export LIBMONGOCRYPT_URL=https://s3.amazonaws.com/mciuploads/libmongocrypt/debian11/master/latest/libmongocrypt.tar.gz -SUCCESS=false ./.evergreen/just.sh setup-test kms gcp +./.evergreen/just.sh setup-test kms gcp-fail bash ./.evergreen/just.sh test-eg diff --git a/.evergreen/scripts/run-mongodb-aws-test.sh b/.evergreen/scripts/run-mongodb-aws-test.sh index d3d801a6d4..f3828ff24e 100755 --- a/.evergreen/scripts/run-mongodb-aws-test.sh +++ b/.evergreen/scripts/run-mongodb-aws-test.sh @@ -24,5 +24,5 @@ echo "Running MONGODB-AWS authentication tests for $1" # Handle credentials and environment setup. . "$DRIVERS_TOOLS"/.evergreen/auth_aws/aws_setup.sh "$1" -AUTH="auth" bash ./.evergreen/just.sh setup-test auth_aws +bash ./.evergreen/just.sh setup-test auth_aws bash ./.evergreen/just.sh test-eg diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index 4704d55d1c..334536828a 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -30,35 +30,36 @@ ] # Map the test name to a test suite. -TEST_SUITE_MAP = dict( - default="default or default_async", - default_sync="default", - default_async="default_async", - serverless="default or default_async", - data_lake="data_lake", - auth_oidc="auth_oidc", - index_management="index_management", - enterprise_auth="auth", - load_balancer="load_balancer", - encryption="encryption", - kms="csfle", - atlas="atlas", - ocsp="ocsp", - auth_aws="auth_aws", - perf="perf", - mockupdb="mockupdb", -) +TEST_SUITE_MAP = { + "atlas": "atlas", + "auth_aws": "auth_aws", + "auth_oidc": "auth_oidc", + "data_lake": "data_lake", + "default": "default or default_async", + "default_async": "default_async", + "default_sync": "default", + "encryption": "encryption", + "enterprise_auth": "auth", + "index_management": "index_management", + "kms": "csfle", + "load_balancer": "load_balancer", + "mockupdb": "mockupdb", + "ocsp": "ocsp", + "perf": "perf", + "serverless": "default or default_async", +} # Map the test name to test extra. -EXTRAS_MAP = dict( - auth_oidc="aws", - auth_aws="aws", - ocsp="ocsp", - pyopenssl="ocsp", - enterprise_auth="gssapi", - encryption="encryption", - kms="encryption", -) +EXTRAS_MAP = { + "auth_aws": "aws", + "auth_oidc": "aws", + "encryption": "encryption", + "enterprise_auth": "gssapi", + "kms": "encryption", + "ocsp": "ocsp", + "pyopenssl": "ocsp", +} + # Map the test name to test group. GROUP_MAP = dict(mockupdb="mockupdb", perf="perf") @@ -126,7 +127,7 @@ def handle_test_env() -> None: if opts.auth: AUTH = "auth" SSL = os.environ.get("SSL", "nossl") - if opts.ssl: + if opts.ssl or "auth" in test_name: AUTH = "ssl" TEST_ARGS = "" # Start compiling the args we'll pass to uv. @@ -292,15 +293,12 @@ def handle_test_env() -> None: write_env("LD_LIBRARY_PATH", f"{CRYPT_SHARED_DIR}:${{LD_LIBRARY_PATH:-}}") if test_name == "kms": - if "SUCCESS" not in os.environ: - raise RuntimeError("Must define SUCCESS") - - if sub_test_name == "azure": + if sub_test_name.startswith("azure"): write_env("TEST_FLE_AZURE_AUTO") else: write_env("TEST_FLE_GCP_AUTO") - write_env("SUCCESS", os.environ["SUCCESS"]) + write_env("SUCCESS", "fail" not in sub_test_name) MONGODB_URI = os.environ.get("MONGODB_URI", "") if "@" in MONGODB_URI: raise RuntimeError("MONGODB_URI unexpectedly contains user credentials in FLE test!") @@ -325,7 +323,6 @@ def handle_test_env() -> None: if is_set("GREEN_FRAMEWORK"): framework = os.environ["GREEN_FRAMEWORK"] - write_env("GREEN_FRAMEWORK", framework) UV_ARGS.append(f"--group {framework}") else: diff --git a/.evergreen/scripts/setup-tests.sh b/.evergreen/scripts/setup-tests.sh index 766df6f1ba..e3bd5a62f1 100755 --- a/.evergreen/scripts/setup-tests.sh +++ b/.evergreen/scripts/setup-tests.sh @@ -21,4 +21,4 @@ if [ -f $SCRIPT_DIR/env.sh ]; then source $SCRIPT_DIR/env.sh fi -python $SCRIPT_DIR/setup-tests.py $@ +uv python $SCRIPT_DIR/setup-tests.py $@ From d8b0cbf0fbcc279c8a5fac29e463792995479c74 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 16 Feb 2025 09:19:10 -0600 Subject: [PATCH 05/42] more cleanup --- .evergreen/config.yml | 7 +------ .evergreen/scripts/bootstrap-mongo-orchestration.sh | 4 ++++ .evergreen/scripts/setup-tests.py | 8 +++++--- .evergreen/scripts/setup-tests.sh | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 1295cfaa47..9fb0570a52 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -206,17 +206,12 @@ functions: params: binary: bash include_expansions_in_env: [VERSION, TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE, LOAD_BALANCER, - STORAGE_ENGINE, REQUIRE_API_VERSION, DRIVERS_TOOLS] + STORAGE_ENGINE, REQUIRE_API_VERSION, DRIVERS_TOOLS, TEST_CRYPT_SHARED] args: - src/.evergreen/scripts/bootstrap-mongo-orchestration.sh - command: expansions.update params: file: mo-expansion.yml - - command: expansions.update - params: - updates: - - key: MONGODB_STARTED - value: "1" "bootstrap data lake": - command: subprocess.exec diff --git a/.evergreen/scripts/bootstrap-mongo-orchestration.sh b/.evergreen/scripts/bootstrap-mongo-orchestration.sh index 947d033cf5..5c6387d4b1 100755 --- a/.evergreen/scripts/bootstrap-mongo-orchestration.sh +++ b/.evergreen/scripts/bootstrap-mongo-orchestration.sh @@ -30,6 +30,10 @@ if [ "$(uname -s)" = "Darwin" ]; then fi fi +if [ -z "${TEST_CRYPT_SHARED:-}" ]; then + export SKIP_CRYPT_SHARED=1 +fi + MONGODB_VERSION=${VERSION} \ TOPOLOGY=${TOPOLOGY} \ AUTH=${AUTH:-noauth} \ diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index 334536828a..b61bd079cf 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -65,7 +65,7 @@ GROUP_MAP = dict(mockupdb="mockupdb", perf="perf") -def write_env(name: str, value: Any) -> None: +def write_env(name: str, value: Any = "1") -> None: with ENV_FILE.open("a", newline="\n") as fid: # Remove any existing quote chars. value = str(value).replace('"', "") @@ -92,6 +92,7 @@ def read_env(path: Path) -> dict[str, Any]: name, _, value = line.partition("=") if value.startswith(('"', "'")): value = value[1:-1] + name = name.replace("export ", "") config[name] = value return config @@ -186,7 +187,7 @@ def handle_test_env() -> None: write_env("DB_PASSWORD", DB_PASSWORD) LOGGER.info("Added auth, DB_USER: %s", DB_USER) - if is_set("MONGODB_STARTED"): + if is_set("MONGODB_URI"): write_env("PYMONGO_MUST_CONNECT", "true") if is_set("DISABLE_TEST_COMMANDS"): @@ -281,7 +282,8 @@ def handle_test_env() -> None: UV_ARGS.append("--extra ocsp") if is_set("TEST_CRYPT_SHARED"): - CRYPT_SHARED_DIR = Path(os.environ["CRYPT_SHARED_LIB_PATH"]).parent.as_posix() + config = read_env(f"{DRIVERS_TOOLS}/mo-expansion.sh") + CRYPT_SHARED_DIR = Path(config["CRYPT_SHARED_LIB_PATH"]).parent.as_posix() LOGGER.info("Using crypt_shared_dir %s", CRYPT_SHARED_DIR) if os.name == "nt": write_env("PATH", f"{CRYPT_SHARED_DIR}:$PATH") diff --git a/.evergreen/scripts/setup-tests.sh b/.evergreen/scripts/setup-tests.sh index e3bd5a62f1..746585c2a4 100755 --- a/.evergreen/scripts/setup-tests.sh +++ b/.evergreen/scripts/setup-tests.sh @@ -21,4 +21,4 @@ if [ -f $SCRIPT_DIR/env.sh ]; then source $SCRIPT_DIR/env.sh fi -uv python $SCRIPT_DIR/setup-tests.py $@ +uv run $SCRIPT_DIR/setup-tests.py $@ From 81b62fd3230bc5bb4cf24837d521a6a05cf6b93c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 16 Feb 2025 15:23:46 -0600 Subject: [PATCH 06/42] remove unused var --- .evergreen/config.yml | 2 +- .evergreen/scripts/setup-tests.py | 1 - .evergreen/scripts/setup-tests.sh | 1 - test/asynchronous/test_client_context.py | 6 ------ test/test_client_context.py | 6 ------ 5 files changed, 1 insertion(+), 15 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 9fb0570a52..b52f7115ad 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -262,7 +262,7 @@ functions: params: include_expansions_in_env: [AUTH, SSL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, COVERAGE, PYTHON_BINARY, LIBMONGOCRYPT_URL, MONGODB_URI, - MONGODB_STARTED, DISABLE_TEST_COMMANDS, GREEN_FRAMEWORK, NO_EXT, COMPRESSORS, SETDEFAULTENCODING] + DISABLE_TEST_COMMANDS, GREEN_FRAMEWORK, NO_EXT, COMPRESSORS] binary: bash working_dir: "src" args: [.evergreen/just.sh, setup-tests, "${TEST_NAME}", "${SUB_TEST_NAME}"] diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index b61bd079cf..cf1b8b625a 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -24,7 +24,6 @@ PASS_THROUGH_ENV = [ "GREEN_FRAMEWORK", "NO_EXT", - "SETDEFAULTENCODING", "MONGODB_API_VERSION", "MONGODB_URI", ] diff --git a/.evergreen/scripts/setup-tests.sh b/.evergreen/scripts/setup-tests.sh index 746585c2a4..f8f202cad3 100755 --- a/.evergreen/scripts/setup-tests.sh +++ b/.evergreen/scripts/setup-tests.sh @@ -9,7 +9,6 @@ set -eu # COMPRESSORS If non-empty, install appropriate compressor. # LIBMONGOCRYPT_URL The URL to download libmongocrypt. # TEST_CRYPT_SHARED If non-empty, install crypt_shared lib. -# SETDEFAULTENCODING Whether to set default encoding in tests. # MONGODB_API_VERSION The mongodb api version to use in tests. # MONGODB_URI If non-empty, use as the MONGODB_URI in tests. diff --git a/test/asynchronous/test_client_context.py b/test/asynchronous/test_client_context.py index 611186d28b..afca1c0b26 100644 --- a/test/asynchronous/test_client_context.py +++ b/test/asynchronous/test_client_context.py @@ -55,12 +55,6 @@ def test_enableTestCommands_is_disabled(self): "enableTestCommands must be disabled when DISABLE_TEST_COMMANDS is set.", ) - def test_setdefaultencoding_worked(self): - if not os.environ.get("SETDEFAULTENCODING"): - raise SkipTest("SETDEFAULTENCODING is not set") - - self.assertEqual(sys.getdefaultencoding(), os.environ["SETDEFAULTENCODING"]) - def test_free_threading_is_enabled(self): if "free-threading build" not in sys.version: raise SkipTest("this test requires the Python free-threading build") diff --git a/test/test_client_context.py b/test/test_client_context.py index e0279c763c..ef3633a8b0 100644 --- a/test/test_client_context.py +++ b/test/test_client_context.py @@ -55,12 +55,6 @@ def test_enableTestCommands_is_disabled(self): "enableTestCommands must be disabled when DISABLE_TEST_COMMANDS is set.", ) - def test_setdefaultencoding_worked(self): - if not os.environ.get("SETDEFAULTENCODING"): - raise SkipTest("SETDEFAULTENCODING is not set") - - self.assertEqual(sys.getdefaultencoding(), os.environ["SETDEFAULTENCODING"]) - def test_free_threading_is_enabled(self): if "free-threading build" not in sys.version: raise SkipTest("this test requires the Python free-threading build") From e2588ccd66c31e622353252f47c4caade098cea5 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 16 Feb 2025 15:33:31 -0600 Subject: [PATCH 07/42] cleanup --- .evergreen/scripts/setup-tests.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index cf1b8b625a..bab783bf81 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -17,8 +17,8 @@ ENV_FILE = HERE / "test-env.sh" DRIVERS_TOOLS = os.environ.get("DRIVERS_TOOLS", "").replace(os.sep, "/") -logging.basicConfig(level=logging.INFO) LOGGER = logging.getLogger(__name__) +logging.basicConfig(level=logging.INFO, format="%(levelname)-8s %(message)s") # Passthrough environment variables. PASS_THROUGH_ENV = [ @@ -130,10 +130,16 @@ def handle_test_env() -> None: if opts.ssl or "auth" in test_name: AUTH = "ssl" TEST_ARGS = "" + # Start compiling the args we'll pass to uv. # Run in an isolated environment so as not to pollute the base venv. UV_ARGS = ["--isolated --extra test"] + test_title = test_name + if sub_test_name: + test_title += f" {sub_test_name}" + LOGGER.info(f"Setting up '{test_title}' with {AUTH=} and {SSL=}...") + # Create the test env file with the initial set of values. with ENV_FILE.open("w", newline="\n") as fid: fid.write("#!/usr/bin/env bash\n") @@ -142,11 +148,15 @@ def handle_test_env() -> None: write_env("AUTH", AUTH) write_env("SSL", SSL) + # Skip CSOT tests on non-linux platforms. if sys.platform != "Linux": write_env("SKIP_CSOT_TESTS") - # Set an environment variable for the test name. + + # Set an environment variable for the test name and sub test name. write_env(f"TEST_{test_name.upper()}") + write_env("SUB_TEST_NAME", sub_test_name) + # Handle pass through env vars. for var in PASS_THROUGH_ENV: if is_set(var): @@ -336,6 +346,8 @@ def handle_test_env() -> None: write_env("TEST_ARGS", TEST_ARGS) write_env("UV_ARGS", " ".join(UV_ARGS)) + LOGGER.info(f"Setting up test '{test_title}' with {AUTH=} and {SSL=}... done.") + if __name__ == "__main__": handle_test_env() From 614cb24776f7e44cfceade4482bd6d8dda1e153d Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 16 Feb 2025 15:34:43 -0600 Subject: [PATCH 08/42] fix invocation --- .evergreen/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index b52f7115ad..72cab17dc9 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -265,7 +265,7 @@ functions: DISABLE_TEST_COMMANDS, GREEN_FRAMEWORK, NO_EXT, COMPRESSORS] binary: bash working_dir: "src" - args: [.evergreen/just.sh, setup-tests, "${TEST_NAME}", "${SUB_TEST_NAME}"] + args: [.evergreen/just.sh, setup-test, "${TEST_NAME}", "${SUB_TEST_NAME}"] - command: subprocess.exec type: test params: From 49f3cde011006fce5752ed82e0ae5f8fa5cc503f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 16 Feb 2025 15:42:16 -0600 Subject: [PATCH 09/42] fix default args --- .evergreen/scripts/setup-tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index bab783bf81..d935dce78f 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -100,8 +100,8 @@ def get_options(): parser = argparse.ArgumentParser( description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter ) - parser.add_argument("test_name", choices=sorted(TEST_SUITE_MAP), default="default") - parser.add_argument("sub_test_name") + parser.add_argument("test_name", choices=sorted(TEST_SUITE_MAP), nargs="?", default="default") + parser.add_argument("sub_test_name", nargs="?") parser.add_argument( "--verbose", "-v", action="store_true", help="Whether to log at the DEBUG level" ) From f72402101f8335c1c09835eeadb0728a195641dc Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sun, 16 Feb 2025 15:54:40 -0600 Subject: [PATCH 10/42] fix args --- .evergreen/scripts/setup-tests.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index d935dce78f..c88a8200a5 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -34,7 +34,7 @@ "auth_aws": "auth_aws", "auth_oidc": "auth_oidc", "data_lake": "data_lake", - "default": "default or default_async", + "default": "", "default_async": "default_async", "default_sync": "default", "encryption": "encryption", @@ -45,7 +45,7 @@ "mockupdb": "mockupdb", "ocsp": "ocsp", "perf": "perf", - "serverless": "default or default_async", + "serverless": "", } # Map the test name to test extra. @@ -340,8 +340,9 @@ def handle_test_env() -> None: # Use --capture=tee-sys so pytest prints test output inline: # https://docs.pytest.org/en/stable/how-to/capture-stdout-stderr.html TEST_ARGS = f"-v --capture=tee-sys --durations=5 {TEST_ARGS}" - TEST_SUITES = TEST_SUITE_MAP[test_name] - TEST_ARGS = f'-m "{TEST_SUITES}" {TEST_ARGS}' + TEST_SUITE = TEST_SUITE_MAP[test_name] + if TEST_SUITE: + TEST_ARGS = f"-m {TEST_SUITE} {TEST_ARGS}" write_env("TEST_ARGS", TEST_ARGS) write_env("UV_ARGS", " ".join(UV_ARGS)) From 403669dff7de6d6a701e8dcbcf0c13d461715283 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 08:02:39 -0600 Subject: [PATCH 11/42] fix path handling --- .evergreen/scripts/setup-tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index c88a8200a5..d533a10629 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -82,9 +82,9 @@ def run_command(cmd: str) -> None: LOGGER.info("Running command %s... done.", cmd) -def read_env(path: Path) -> dict[str, Any]: +def read_env(path: Path | str) -> dict[str, Any]: config = dict() - with path.open() as fid: + with Path(path).open() as fid: for line in fid.readlines(): if "=" not in line: continue From b775f97b229dbfd9bd67656080100d93f69047b6 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 08:14:17 -0600 Subject: [PATCH 12/42] fix config handling --- .../scripts/run-enterprise-auth-tests.sh | 2 +- .evergreen/scripts/setup-tests.py | 27 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.evergreen/scripts/run-enterprise-auth-tests.sh b/.evergreen/scripts/run-enterprise-auth-tests.sh index f4656cba9e..21a7fef301 100755 --- a/.evergreen/scripts/run-enterprise-auth-tests.sh +++ b/.evergreen/scripts/run-enterprise-auth-tests.sh @@ -5,5 +5,5 @@ set -eu set +x # Use the default python to bootstrap secrets. bash "${DRIVERS_TOOLS}"/.evergreen/secrets_handling/setup-secrets.sh drivers/enterprise_auth -bash "${PROJECT_DIRECTORY}"/.evergreen/just.sh setup-test enterprise-auth +bash "${PROJECT_DIRECTORY}"/.evergreen/just.sh setup-test enterprise_auth bash "${PROJECT_DIRECTORY}"/.evergreen/just.sh test-eg diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index d533a10629..9f9355646b 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -43,6 +43,7 @@ "kms": "csfle", "load_balancer": "load_balancer", "mockupdb": "mockupdb", + "pyopenssl": "", "ocsp": "ocsp", "perf": "perf", "serverless": "", @@ -171,24 +172,24 @@ def handle_test_env() -> None: if AUTH != "noauth": if test_name == "data_lake": config = read_env(f"{DRIVERS_TOOLS}/.evergreen/atlas_data_lake/secrets-export.sh") - DB_USER = config("ADL_USERNAME") - DB_PASSWORD = config("ADL_PASSWORD") + DB_USER = config["ADL_USERNAME"] + DB_PASSWORD = config["ADL_PASSWORD"] elif test_name == "serverless": config = read_env(f"{DRIVERS_TOOLS}/.evergreen/serverless/secrets-export.sh") - DB_USER = config("SERVERLESS_ATLAS_USER") - DB_PASSWORD = config("SERVERLESS_ATLAS_PASSWORD") - write_env("MONGODB_URI", config("SERVERLESS_URI")) - write_env("SINGLE_MONGOS_LB_URI", config("SERVERLESS_URI")) - write_env("MULTI_MONGOS_LB_URI", config("SERVERLESS_URI")) + DB_USER = config["SERVERLESS_ATLAS_USER"] + DB_PASSWORD = config["SERVERLESS_ATLAS_PASSWORD"] + write_env("MONGODB_URI", config["SERVERLESS_URI"]) + write_env("SINGLE_MONGOS_LB_URI", config["SERVERLESS_URI"]) + write_env("MULTI_MONGOS_LB_URI", config["SERVERLESS_URI"]) elif test_name == "auth_oidc": config = read_env(f"{DRIVERS_TOOLS}/.evergreen/auth_oidc/secrets-export.sh") - DB_USER = config("OIDC_ADMIN_USER") - DB_PASSWORD = config("OIDC_ADMIN_PWD") - write_env("DB_IP", config("MONGODB_URI")) + DB_USER = config["OIDC_ADMIN_USER"] + DB_PASSWORD = config["OIDC_ADMIN_PWD"] + write_env("DB_IP", config["MONGODB_URI"]) elif test_name == "index_management": config = read_env(f"{DRIVERS_TOOLS}/.evergreen/atlas/secrets-export.sh") - DB_USER = config("DRIVERS_ATLAS_LAMBDA_USER") - DB_PASSWORD = config("DRIVERS_ATLAS_LAMBDA_PASSWORD") + DB_USER = config["DRIVERS_ATLAS_LAMBDA_USER"] + DB_PASSWORD = config["DRIVERS_ATLAS_LAMBDA_PASSWORD"] else: DB_USER = "bob" DB_PASSWORD = "pwd123" # noqa: S105 @@ -255,7 +256,7 @@ def handle_test_env() -> None: if compressors == "snappy": UV_ARGS.append("--extra snappy") elif compressors == "zstd": - UV_ARGS.append("--extra zstandard") + UV_ARGS.append("--extra zstd") if test_name in ["encryption", "kms"]: # Check for libmongocrypt download. From 73e76661e8e25ddfdac52c7406f373415d7e35fe Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 08:32:27 -0600 Subject: [PATCH 13/42] fix enterprise auth --- .evergreen/scripts/setup-tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index 9f9355646b..6bc21a535d 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -204,6 +204,7 @@ def handle_test_env() -> None: write_env("PYMONGO_DISABLE_TEST_COMMANDS", "1") if test_name == "enterprise_auth": + config = read_env(f"{ROOT}/secrets-export.sh") if os.name == "nt": LOGGER.info("Setting GSSAPI_PASS") write_env("GSSAPI_PASS", os.environ["SASL_PASS"]) From 9003b25d6f11a6ebb748780c8071677b5e4616ee Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 09:53:44 -0600 Subject: [PATCH 14/42] fix enterprise auth --- .evergreen/scripts/setup-tests.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index 6bc21a535d..52e530df9a 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -207,7 +207,7 @@ def handle_test_env() -> None: config = read_env(f"{ROOT}/secrets-export.sh") if os.name == "nt": LOGGER.info("Setting GSSAPI_PASS") - write_env("GSSAPI_PASS", os.environ["SASL_PASS"]) + write_env("GSSAPI_PASS", config["SASL_PASS"]) write_env("GSSAPI_CANONICALIZE", "true") else: # BUILD-3830 @@ -215,20 +215,20 @@ def handle_test_env() -> None: krb_conf.touch() write_env("KRB5_CONFIG", krb_conf) LOGGER.info("Writing keytab") - keytab = base64.b64decode(os.environ["KEYTAB_BASE64"]) + keytab = base64.b64decode(config["KEYTAB_BASE64"]) keytab_file = ROOT / ".evergreen/drivers.keytab" with keytab_file.open("wb") as fid: fid.write(keytab) - principal = os.environ["PRINCIPAL"] + principal = config["PRINCIPAL"] LOGGER.info("Running kinit") os.environ["KRB5_CONFIG"] = str(krb_conf) cmd = f"kinit -k -t {keytab_file} -p {principal}" run_command(cmd) LOGGER.info("Setting GSSAPI variables") - write_env("GSSAPI_HOST", os.environ["SASL_HOST"]) - write_env("GSSAPI_PORT", os.environ["SASL_PORT"]) - write_env("GSSAPI_PRINCIPAL", os.environ["PRINCIPAL"]) + write_env("GSSAPI_HOST", config["SASL_HOST"]) + write_env("GSSAPI_PORT", config["SASL_PORT"]) + write_env("GSSAPI_PRINCIPAL", config["PRINCIPAL"]) if test_name == "load_balancer": SINGLE_MONGOS_LB_URI = os.environ.get( From 013a6f79717a5bcbf6b2c07c8f51363e064fea3c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 09:55:25 -0600 Subject: [PATCH 15/42] debug --- .evergreen/scripts/setup-tests.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.evergreen/scripts/setup-tests.sh b/.evergreen/scripts/setup-tests.sh index f8f202cad3..d33322d4f0 100755 --- a/.evergreen/scripts/setup-tests.sh +++ b/.evergreen/scripts/setup-tests.sh @@ -21,3 +21,6 @@ if [ -f $SCRIPT_DIR/env.sh ]; then fi uv run $SCRIPT_DIR/setup-tests.py $@ + +cat $ROOT_DIR/.evergreen/scripts/test-env.sh +exit 1 From 4a630e0282eef48032308055cbcae176adac214d Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 10:05:18 -0600 Subject: [PATCH 16/42] fix auth handling --- .evergreen/scripts/setup-tests.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index 52e530df9a..c76ab807bf 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -125,11 +125,13 @@ def handle_test_env() -> None: test_name = opts.test_name sub_test_name = opts.sub_test_name AUTH = os.environ.get("AUTH", "noauth") - if opts.auth: - AUTH = "auth" + if opts.auth or "auth" in test_name: + # Only 'auth_aws ecs' shouldn't have extra auth set. + if not (test_name == "auth_aws" and sub_test_name == "ecs"): + AUTH = "auth" SSL = os.environ.get("SSL", "nossl") - if opts.ssl or "auth" in test_name: - AUTH = "ssl" + if opts.ssl: + SSL = "ssl" TEST_ARGS = "" # Start compiling the args we'll pass to uv. From 4bd7635b03caeceb4d79effa0261ca9277850496 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 10:08:34 -0600 Subject: [PATCH 17/42] fix enterprise auth --- .evergreen/scripts/setup-tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index c76ab807bf..99994c8aed 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -89,7 +89,7 @@ def read_env(path: Path | str) -> dict[str, Any]: for line in fid.readlines(): if "=" not in line: continue - name, _, value = line.partition("=") + name, _, value = line.strip().partition("=") if value.startswith(('"', "'")): value = value[1:-1] name = name.replace("export ", "") From 286d684dc6336130bd99c4e283316101da41f22e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 10:11:32 -0600 Subject: [PATCH 18/42] remove debugs --- .evergreen/scripts/setup-tests.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/.evergreen/scripts/setup-tests.sh b/.evergreen/scripts/setup-tests.sh index d33322d4f0..f8f202cad3 100755 --- a/.evergreen/scripts/setup-tests.sh +++ b/.evergreen/scripts/setup-tests.sh @@ -21,6 +21,3 @@ if [ -f $SCRIPT_DIR/env.sh ]; then fi uv run $SCRIPT_DIR/setup-tests.py $@ - -cat $ROOT_DIR/.evergreen/scripts/test-env.sh -exit 1 From 5882ff0d588c7616c234c7c03e420aa8add594df Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 10:24:30 -0600 Subject: [PATCH 19/42] fix auth aws --- .evergreen/run-mongodb-aws-ecs-test.sh | 2 +- .evergreen/scripts/setup-tests.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.evergreen/run-mongodb-aws-ecs-test.sh b/.evergreen/run-mongodb-aws-ecs-test.sh index 66ec4b82e5..6dfb73c54a 100755 --- a/.evergreen/run-mongodb-aws-ecs-test.sh +++ b/.evergreen/run-mongodb-aws-ecs-test.sh @@ -29,5 +29,5 @@ export PYTHON_BINARY=$PYTHON_VER export SET_XTRACE_ON=1 cd src rm -rf .venv -bash ./.evergreen/just.sh setup-test auth_aws +bash ./.evergreen/just.sh setup-test auth_aws ecs bash .evergreen/just.sh test-eg diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index 99994c8aed..81710753ce 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -49,6 +49,9 @@ "serverless": "", } +# Tests that require a sub test suite. +SUB_TEST_REQUIRED = ["auth_aws", "kms"] + # Map the test name to test extra. EXTRAS_MAP = { "auth_aws": "aws", @@ -124,6 +127,8 @@ def handle_test_env() -> None: opts = get_options() test_name = opts.test_name sub_test_name = opts.sub_test_name + if test_name in SUB_TEST_REQUIRED and not sub_test_name: + raise ValueError(f"Test '{test_name}' requires a sub_test_name") AUTH = os.environ.get("AUTH", "noauth") if opts.auth or "auth" in test_name: # Only 'auth_aws ecs' shouldn't have extra auth set. From c6908c5e8a4a8824ff128c03b01a08d0ddeba75e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 10:24:51 -0600 Subject: [PATCH 20/42] fix auth aws --- .evergreen/scripts/run-mongodb-aws-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/scripts/run-mongodb-aws-test.sh b/.evergreen/scripts/run-mongodb-aws-test.sh index f3828ff24e..917482eaa2 100755 --- a/.evergreen/scripts/run-mongodb-aws-test.sh +++ b/.evergreen/scripts/run-mongodb-aws-test.sh @@ -24,5 +24,5 @@ echo "Running MONGODB-AWS authentication tests for $1" # Handle credentials and environment setup. . "$DRIVERS_TOOLS"/.evergreen/auth_aws/aws_setup.sh "$1" -bash ./.evergreen/just.sh setup-test auth_aws +bash ./.evergreen/just.sh setup-test auth_aws $1 bash ./.evergreen/just.sh test-eg From 75f1eba70608fed1ff637dec53fba1f3e2c37e58 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 10:27:23 -0600 Subject: [PATCH 21/42] fix auth oidc --- .evergreen/scripts/setup-tests.py | 1 - 1 file changed, 1 deletion(-) diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index 81710753ce..2e9fee00d2 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -189,7 +189,6 @@ def handle_test_env() -> None: write_env("SINGLE_MONGOS_LB_URI", config["SERVERLESS_URI"]) write_env("MULTI_MONGOS_LB_URI", config["SERVERLESS_URI"]) elif test_name == "auth_oidc": - config = read_env(f"{DRIVERS_TOOLS}/.evergreen/auth_oidc/secrets-export.sh") DB_USER = config["OIDC_ADMIN_USER"] DB_PASSWORD = config["OIDC_ADMIN_PWD"] write_env("DB_IP", config["MONGODB_URI"]) From f0dac99635104e4a009f0f2b6286c56e56e2844d Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 10:33:47 -0600 Subject: [PATCH 22/42] fix auth oidc --- .evergreen/scripts/setup-tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index 2e9fee00d2..b1c3566e73 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -189,8 +189,8 @@ def handle_test_env() -> None: write_env("SINGLE_MONGOS_LB_URI", config["SERVERLESS_URI"]) write_env("MULTI_MONGOS_LB_URI", config["SERVERLESS_URI"]) elif test_name == "auth_oidc": - DB_USER = config["OIDC_ADMIN_USER"] - DB_PASSWORD = config["OIDC_ADMIN_PWD"] + DB_USER = os.environ["OIDC_ADMIN_USER"] + DB_PASSWORD = os.environ["OIDC_ADMIN_PWD"] write_env("DB_IP", config["MONGODB_URI"]) elif test_name == "index_management": config = read_env(f"{DRIVERS_TOOLS}/.evergreen/atlas/secrets-export.sh") From 2b75430c923f6b509f0c0df47f92d3454bbdafa5 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 10:38:32 -0600 Subject: [PATCH 23/42] fix auth oidc --- .evergreen/scripts/setup-tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index b1c3566e73..0ec7630fe0 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -191,7 +191,7 @@ def handle_test_env() -> None: elif test_name == "auth_oidc": DB_USER = os.environ["OIDC_ADMIN_USER"] DB_PASSWORD = os.environ["OIDC_ADMIN_PWD"] - write_env("DB_IP", config["MONGODB_URI"]) + write_env("DB_IP", os.environ["MONGODB_URI"]) elif test_name == "index_management": config = read_env(f"{DRIVERS_TOOLS}/.evergreen/atlas/secrets-export.sh") DB_USER = config["DRIVERS_ATLAS_LAMBDA_USER"] From bc6af391d96b8502d4947a2f2f4999a5465a6a44 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 11:05:25 -0600 Subject: [PATCH 24/42] debug ecs --- .evergreen/run-azurekms-fail-test.sh | 1 + .evergreen/scripts/setup-tests.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.evergreen/run-azurekms-fail-test.sh b/.evergreen/run-azurekms-fail-test.sh index 8a4412c0f5..8bff9ba6e2 100755 --- a/.evergreen/run-azurekms-fail-test.sh +++ b/.evergreen/run-azurekms-fail-test.sh @@ -2,6 +2,7 @@ set -o errexit # Exit the script with error if any of the commands fail HERE=$(dirname ${BASH_SOURCE:-$0}) . $DRIVERS_TOOLS/.evergreen/csfle/azurekms/setup-secrets.sh +export LIBMONGOCRYPT_URL=https://s3.amazonaws.com/mciuploads/libmongocrypt/debian11/master/latest/libmongocrypt.tar.gz bash $HERE/just.sh setup-test kms azure-fail PYTHON_BINARY=/opt/mongodbtoolchain/v4/bin/python3 \ KEY_NAME="${AZUREKMS_KEYNAME}" \ diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index 0ec7630fe0..6b9cbb9eed 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -130,9 +130,11 @@ def handle_test_env() -> None: if test_name in SUB_TEST_REQUIRED and not sub_test_name: raise ValueError(f"Test '{test_name}' requires a sub_test_name") AUTH = os.environ.get("AUTH", "noauth") + LOGGER.info(f"HI, {AUTH=}") # TODO remove if opts.auth or "auth" in test_name: # Only 'auth_aws ecs' shouldn't have extra auth set. if not (test_name == "auth_aws" and sub_test_name == "ecs"): + LOGGER.info(f"Why am I setting this? '{sub_test_name=}'") AUTH = "auth" SSL = os.environ.get("SSL", "nossl") if opts.ssl: From 7b7d10fe04a18f9c0087c1d85c49682808be1193 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 14:22:13 -0600 Subject: [PATCH 25/42] fix index management and aws auth --- .evergreen/scripts/setup-tests.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.evergreen/scripts/setup-tests.py b/.evergreen/scripts/setup-tests.py index 6b9cbb9eed..eec141aa26 100644 --- a/.evergreen/scripts/setup-tests.py +++ b/.evergreen/scripts/setup-tests.py @@ -21,12 +21,7 @@ logging.basicConfig(level=logging.INFO, format="%(levelname)-8s %(message)s") # Passthrough environment variables. -PASS_THROUGH_ENV = [ - "GREEN_FRAMEWORK", - "NO_EXT", - "MONGODB_API_VERSION", - "MONGODB_URI", -] +PASS_THROUGH_ENV = ["GREEN_FRAMEWORK", "NO_EXT", "MONGODB_API_VERSION"] # Map the test name to a test suite. TEST_SUITE_MAP = { @@ -132,10 +127,10 @@ def handle_test_env() -> None: AUTH = os.environ.get("AUTH", "noauth") LOGGER.info(f"HI, {AUTH=}") # TODO remove if opts.auth or "auth" in test_name: - # Only 'auth_aws ecs' shouldn't have extra auth set. - if not (test_name == "auth_aws" and sub_test_name == "ecs"): - LOGGER.info(f"Why am I setting this? '{sub_test_name=}'") - AUTH = "auth" + AUTH = "auth" + # 'auth_aws ecs' shouldn't have extra auth set. + if test_name == "auth_aws" and sub_test_name == "ecs": + AUTH = "noauth" SSL = os.environ.get("SSL", "nossl") if opts.ssl: SSL = "ssl" @@ -198,6 +193,7 @@ def handle_test_env() -> None: config = read_env(f"{DRIVERS_TOOLS}/.evergreen/atlas/secrets-export.sh") DB_USER = config["DRIVERS_ATLAS_LAMBDA_USER"] DB_PASSWORD = config["DRIVERS_ATLAS_LAMBDA_PASSWORD"] + write_env("MONGODB_URI", config["MONGODB_URI"]) else: DB_USER = "bob" DB_PASSWORD = "pwd123" # noqa: S105 From 901f888ceeaa2182d553bda89a7d083151589540 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 17 Feb 2025 14:40:40 -0600 Subject: [PATCH 26/42] test azure oidc fix --- .evergreen/scripts/configure-env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/scripts/configure-env.sh b/.evergreen/scripts/configure-env.sh index 5515413562..26dfcb265e 100755 --- a/.evergreen/scripts/configure-env.sh +++ b/.evergreen/scripts/configure-env.sh @@ -76,7 +76,7 @@ EOT # Write the .env file for drivers-tools. rm -rf $DRIVERS_TOOLS -git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS +git clone --branch aws-output-file https://github.com/blink1073/drivers-evergreen-tools.git $DRIVERS_TOOLS cat < ${DRIVERS_TOOLS}/.env SKIP_LEGACY_SHELL=1 From 43b7c8300f50a3f2ca27a0e6570a99c30801197c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 18 Feb 2025 20:26:26 -0600 Subject: [PATCH 27/42] cleanup --- .evergreen/scripts/setup-tests.sh | 2 +- .evergreen/scripts/setup_tests.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.evergreen/scripts/setup-tests.sh b/.evergreen/scripts/setup-tests.sh index f8f202cad3..84244827e0 100755 --- a/.evergreen/scripts/setup-tests.sh +++ b/.evergreen/scripts/setup-tests.sh @@ -20,4 +20,4 @@ if [ -f $SCRIPT_DIR/env.sh ]; then source $SCRIPT_DIR/env.sh fi -uv run $SCRIPT_DIR/setup-tests.py $@ +uv run $SCRIPT_DIR/setup_tests.py $@ diff --git a/.evergreen/scripts/setup_tests.py b/.evergreen/scripts/setup_tests.py index af0679b63b..b6cafbd21d 100644 --- a/.evergreen/scripts/setup_tests.py +++ b/.evergreen/scripts/setup_tests.py @@ -201,7 +201,6 @@ def handle_test_env() -> None: if test_name in SUB_TEST_REQUIRED and not sub_test_name: raise ValueError(f"Test '{test_name}' requires a sub_test_name") AUTH = os.environ.get("AUTH", "noauth") - LOGGER.info(f"HI, {AUTH=}") # TODO remove if opts.auth or "auth" in test_name: AUTH = "auth" # 'auth_aws ecs' shouldn't have extra auth set. From 2f181d7f8039a8f5df6065d9c4d3f611ed1eb404 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 20 Feb 2025 06:25:52 -0600 Subject: [PATCH 28/42] fix ocsp --- .evergreen/scripts/configure-env.sh | 2 +- .evergreen/scripts/setup-dev-env.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.evergreen/scripts/configure-env.sh b/.evergreen/scripts/configure-env.sh index 26dfcb265e..5515413562 100755 --- a/.evergreen/scripts/configure-env.sh +++ b/.evergreen/scripts/configure-env.sh @@ -76,7 +76,7 @@ EOT # Write the .env file for drivers-tools. rm -rf $DRIVERS_TOOLS -git clone --branch aws-output-file https://github.com/blink1073/drivers-evergreen-tools.git $DRIVERS_TOOLS +git clone https://github.com/mongodb-labs/drivers-evergreen-tools.git $DRIVERS_TOOLS cat < ${DRIVERS_TOOLS}/.env SKIP_LEGACY_SHELL=1 diff --git a/.evergreen/scripts/setup-dev-env.sh b/.evergreen/scripts/setup-dev-env.sh index b26dc3ae0e..5517dcdc86 100755 --- a/.evergreen/scripts/setup-dev-env.sh +++ b/.evergreen/scripts/setup-dev-env.sh @@ -3,7 +3,8 @@ set -eux HERE=$(dirname ${BASH_SOURCE:-$0}) -pushd "$(dirname "$(dirname $HERE)")" > /dev/null +ROOT=$(dirname "$(dirname $HERE)") +pushd $ROOT > /dev/null # Source the env files to pick up common variables. if [ -f $HERE/env.sh ]; then @@ -26,7 +27,7 @@ fi # Ensure there is a python venv. if [ ! -d $BIN_DIR ]; then - . .evergreen/utils.sh + . $ROOT/.evergreen/utils.sh if [ -z "${PYTHON_BINARY:-}" ]; then PYTHON_BINARY=$(find_python3) From 1a2c3d468dfde84aa0b4f9c5057e72492c3a62b5 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 20 Feb 2025 06:36:57 -0600 Subject: [PATCH 29/42] try again --- .evergreen/scripts/setup_tests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.evergreen/scripts/setup_tests.py b/.evergreen/scripts/setup_tests.py index b6cafbd21d..f81c3ed2f9 100644 --- a/.evergreen/scripts/setup_tests.py +++ b/.evergreen/scripts/setup_tests.py @@ -399,6 +399,9 @@ def handle_test_env() -> None: write_env("CA_FILE", os.environ["CA_FILE"]) write_env("OCSP_TLS_SHOULD_SUCCEED", os.environ["OCSP_TLS_SHOULD_SUCCEED"]) + if test_name == "auth_aws": + write_env("MONGODB_URI", os.environ["MONGODB_URI"]) + if test_name == "perf": # PYTHON-4769 Run perf_test.py directly otherwise pytest's test collection negatively # affects the benchmark results. From 18ea70c66a22087bc13cc5791f904e76f84afe6b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 20 Feb 2025 07:12:42 -0600 Subject: [PATCH 30/42] debug --- .evergreen/scripts/setup-dev-env.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.evergreen/scripts/setup-dev-env.sh b/.evergreen/scripts/setup-dev-env.sh index 5517dcdc86..2c7a3b842a 100755 --- a/.evergreen/scripts/setup-dev-env.sh +++ b/.evergreen/scripts/setup-dev-env.sh @@ -27,7 +27,9 @@ fi # Ensure there is a python venv. if [ ! -d $BIN_DIR ]; then - . $ROOT/.evergreen/utils.sh + ls + ls .evergreen + . .evergreen/utils.sh if [ -z "${PYTHON_BINARY:-}" ]; then PYTHON_BINARY=$(find_python3) From 9bee02348ff240ed707f99c026b541a11748a0af Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 20 Feb 2025 07:16:15 -0600 Subject: [PATCH 31/42] debug --- .evergreen/scripts/setup-dev-env.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.evergreen/scripts/setup-dev-env.sh b/.evergreen/scripts/setup-dev-env.sh index 2c7a3b842a..f10bc9f6c4 100755 --- a/.evergreen/scripts/setup-dev-env.sh +++ b/.evergreen/scripts/setup-dev-env.sh @@ -6,6 +6,10 @@ HERE=$(dirname ${BASH_SOURCE:-$0}) ROOT=$(dirname "$(dirname $HERE)") pushd $ROOT > /dev/null +pwd + +echo "ROOT=$ROOT" + # Source the env files to pick up common variables. if [ -f $HERE/env.sh ]; then . $HERE/env.sh @@ -18,6 +22,7 @@ fi # Ensure dependencies are installed. bash $HERE/install-dependencies.sh +pwd # Set the location of the python bin dir. if [ "Windows_NT" = "${OS:-}" ]; then BIN_DIR=.venv/Scripts From f29854c4e1fd267bef0daefa86793d8ef5eb948a Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 20 Feb 2025 07:29:42 -0600 Subject: [PATCH 32/42] fix path handling --- .evergreen/scripts/setup-dev-env.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.evergreen/scripts/setup-dev-env.sh b/.evergreen/scripts/setup-dev-env.sh index f10bc9f6c4..a76bebe2c0 100755 --- a/.evergreen/scripts/setup-dev-env.sh +++ b/.evergreen/scripts/setup-dev-env.sh @@ -3,13 +3,10 @@ set -eux HERE=$(dirname ${BASH_SOURCE:-$0}) +HERE="$( cd -- "$HERE" > /dev/null 2>&1 && pwd )" ROOT=$(dirname "$(dirname $HERE)") pushd $ROOT > /dev/null -pwd - -echo "ROOT=$ROOT" - # Source the env files to pick up common variables. if [ -f $HERE/env.sh ]; then . $HERE/env.sh @@ -22,7 +19,6 @@ fi # Ensure dependencies are installed. bash $HERE/install-dependencies.sh -pwd # Set the location of the python bin dir. if [ "Windows_NT" = "${OS:-}" ]; then BIN_DIR=.venv/Scripts @@ -32,9 +28,7 @@ fi # Ensure there is a python venv. if [ ! -d $BIN_DIR ]; then - ls - ls .evergreen - . .evergreen/utils.sh + . $ROOT/.evergreen/utils.sh if [ -z "${PYTHON_BINARY:-}" ]; then PYTHON_BINARY=$(find_python3) From 18b51896e48ce919975e1ad977253acaad021471 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 20 Feb 2025 09:37:10 -0600 Subject: [PATCH 33/42] fix path handling --- .evergreen/run-tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 979cf5beac..620ba9b399 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -2,6 +2,7 @@ set -eu SCRIPT_DIR=$(dirname ${BASH_SOURCE:-$0}) +SCRIPT_DIR="$( cd -- "$SCRIPT_DIR" > /dev/null 2>&1 && pwd )" ROOT_DIR="$(dirname "$(dirname $SCRIPT_DIR)")" export PIP_QUIET=1 # Quiet by default From 5c2a7a463e97c6a891f63182a3f23a9be4ceb034 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 20 Feb 2025 09:50:10 -0600 Subject: [PATCH 34/42] fix path handling --- .evergreen/run-tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index e476a466f7..1d6d22a14b 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -5,8 +5,6 @@ SCRIPT_DIR=$(dirname ${BASH_SOURCE:-$0}) SCRIPT_DIR="$( cd -- "$SCRIPT_DIR" > /dev/null 2>&1 && pwd )" ROOT_DIR="$(dirname "$(dirname $SCRIPT_DIR)")" -pushd $ROOT_DIR - export PIP_QUIET=1 # Quiet by default export PIP_PREFER_BINARY=1 # Prefer binary dists by default export UV_FROZEN=1 # Do not modify lock files @@ -27,6 +25,8 @@ else echo "Missing test inputs, please run 'just setup-test'" fi +pushd $ROOT_DIR + # Source the local secrets export file if available. if [ -f "./secrets-export.sh" ]; then . "./secrets-export.sh" From e9988f72de5887a394f12f7b65344dbe6af0ec4e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 20 Feb 2025 09:56:18 -0600 Subject: [PATCH 35/42] debug --- .evergreen/run-tests.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 1d6d22a14b..73d5f294e1 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -1,10 +1,11 @@ #!/bin/bash -set -eu +set -eux SCRIPT_DIR=$(dirname ${BASH_SOURCE:-$0}) SCRIPT_DIR="$( cd -- "$SCRIPT_DIR" > /dev/null 2>&1 && pwd )" ROOT_DIR="$(dirname "$(dirname $SCRIPT_DIR)")" +pwd export PIP_QUIET=1 # Quiet by default export PIP_PREFER_BINARY=1 # Prefer binary dists by default export UV_FROZEN=1 # Do not modify lock files @@ -25,6 +26,7 @@ else echo "Missing test inputs, please run 'just setup-test'" fi +pwd pushd $ROOT_DIR # Source the local secrets export file if available. @@ -34,6 +36,7 @@ fi PYTHON_IMPL=$(uv run python -c "import platform; print(platform.python_implementation())") +pwd # Ensure C extensions if applicable. if [ -z "${NO_EXT:-}" ] && [ "$PYTHON_IMPL" = "CPython" ]; then uv run --frozen tools/fail_if_no_c.py From 5b3504745803a2063101e09344141db0dd0e3987 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 20 Feb 2025 10:01:02 -0600 Subject: [PATCH 36/42] fix path handling --- .evergreen/run-tests.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 73d5f294e1..f3c71b41ff 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -3,9 +3,10 @@ set -eux SCRIPT_DIR=$(dirname ${BASH_SOURCE:-$0}) SCRIPT_DIR="$( cd -- "$SCRIPT_DIR" > /dev/null 2>&1 && pwd )" -ROOT_DIR="$(dirname "$(dirname $SCRIPT_DIR)")" +ROOT_DIR="$(dirname $SCRIPT_DIR)" + +pushd $ROOT_DIR -pwd export PIP_QUIET=1 # Quiet by default export PIP_PREFER_BINARY=1 # Prefer binary dists by default export UV_FROZEN=1 # Do not modify lock files @@ -26,8 +27,6 @@ else echo "Missing test inputs, please run 'just setup-test'" fi -pwd -pushd $ROOT_DIR # Source the local secrets export file if available. if [ -f "./secrets-export.sh" ]; then @@ -36,7 +35,6 @@ fi PYTHON_IMPL=$(uv run python -c "import platform; print(platform.python_implementation())") -pwd # Ensure C extensions if applicable. if [ -z "${NO_EXT:-}" ] && [ "$PYTHON_IMPL" = "CPython" ]; then uv run --frozen tools/fail_if_no_c.py From 980a6dcc5111e5326f538f5db837d3fd2c26b064 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 20 Feb 2025 10:51:43 -0600 Subject: [PATCH 37/42] fix ecs test --- .evergreen/run-mongodb-aws-ecs-test.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.evergreen/run-mongodb-aws-ecs-test.sh b/.evergreen/run-mongodb-aws-ecs-test.sh index 487616e98a..fc3a092bd4 100755 --- a/.evergreen/run-mongodb-aws-ecs-test.sh +++ b/.evergreen/run-mongodb-aws-ecs-test.sh @@ -29,12 +29,6 @@ export PYTHON_BINARY=$PYTHON_VER export SET_XTRACE_ON=1 cd src rm -rf .venv -<<<<<<< HEAD -bash ./.evergreen/just.sh setup-test auth_aws ecs -||||||| 4e672bd54 -bash ./.evergreen/just.sh setup-test -======= rm -f .evergreen/scripts/test-env.sh || true -bash ./.evergreen/just.sh setup-test ->>>>>>> 691ab8e783f01324b91f2178658957849d94ffeb +bash ./.evergreen/just.sh setup-test auth_aws ecs bash .evergreen/just.sh test-eg From e17983153667b1b405512afd8f493bd22ba27182 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 20 Feb 2025 13:29:59 -0600 Subject: [PATCH 38/42] lint --- .evergreen/scripts/run-ocsp-test.sh | 1 + .evergreen/scripts/setup-tests.sh | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.evergreen/scripts/run-ocsp-test.sh b/.evergreen/scripts/run-ocsp-test.sh index 1aebed58de..9c48867041 100755 --- a/.evergreen/scripts/run-ocsp-test.sh +++ b/.evergreen/scripts/run-ocsp-test.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -eu pushd "${PROJECT_DIRECTORY}/.evergreen" bash scripts/setup-dev-env.sh diff --git a/.evergreen/scripts/setup-tests.sh b/.evergreen/scripts/setup-tests.sh index 84244827e0..8e073dcec9 100755 --- a/.evergreen/scripts/setup-tests.sh +++ b/.evergreen/scripts/setup-tests.sh @@ -13,11 +13,10 @@ set -eu # MONGODB_URI If non-empty, use as the MONGODB_URI in tests. SCRIPT_DIR=$(dirname ${BASH_SOURCE:-$0}) -ROOT_DIR="$(dirname "$(dirname $SCRIPT_DIR)")" # Try to source the env file. if [ -f $SCRIPT_DIR/env.sh ]; then source $SCRIPT_DIR/env.sh fi -uv run $SCRIPT_DIR/setup_tests.py $@ +uv run $SCRIPT_DIR/setup_tests.py "$@" From 6d3b537b91e3fdec38818f43db3aa8af83eb4a27 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 21 Feb 2025 08:52:36 -0600 Subject: [PATCH 39/42] address review --- .evergreen/scripts/generate_config.py | 1 - .evergreen/scripts/setup-dev-env.sh | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index db7b336420..113795d4af 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -818,7 +818,6 @@ def create_server_tasks(): test_vars["TEST_NAME"] = "default_async" test_func = FunctionCall(func="run tests", vars=test_vars) tasks.append(EvgTask(name=name, tags=tags, commands=[bootstrap_func, test_func])) - return tasks diff --git a/.evergreen/scripts/setup-dev-env.sh b/.evergreen/scripts/setup-dev-env.sh index a76bebe2c0..04a377a2d2 100755 --- a/.evergreen/scripts/setup-dev-env.sh +++ b/.evergreen/scripts/setup-dev-env.sh @@ -51,3 +51,5 @@ echo "Setting up python environment... done." if [ -d .git ] && [ ! -f .git/hooks/pre-commit ]; then uv run --frozen pre-commit install fi + +popd > /dev/null From d01091bec7ba667a2b182ae008866ba1c6ab03b9 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 21 Feb 2025 08:53:38 -0600 Subject: [PATCH 40/42] debug --- .evergreen/run-tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index f3c71b41ff..5757f07ac7 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -23,6 +23,8 @@ fi if [ -f $SCRIPT_DIR/scripts/test-env.sh ]; then echo "Sourcing test inputs" . $SCRIPT_DIR/scripts/test-env.sh + cat $SCRIPT_DIR/scripts/test-env.sh + exit 1 else echo "Missing test inputs, please run 'just setup-test'" fi From 95b781031e75367ca93042abd20847c0f44d4698 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 21 Feb 2025 09:56:46 -0600 Subject: [PATCH 41/42] Split NO_EXT tests into sync and async --- .evergreen/generated_configs/variants.yml | 10 +++++----- .evergreen/scripts/generate_config.py | 2 +- .evergreen/scripts/setup_tests.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.evergreen/generated_configs/variants.yml b/.evergreen/generated_configs/variants.yml index 2399140d77..2793f1f7fb 100644 --- a/.evergreen/generated_configs/variants.yml +++ b/.evergreen/generated_configs/variants.yml @@ -772,7 +772,7 @@ buildvariants: # No c ext tests - name: no-c-ext-rhel8-python3.9 tasks: - - name: .standalone .noauth .nossl .sync_async + - name: .standalone .noauth .nossl !.sync_async display_name: No C Ext RHEL8 Python3.9 run_on: - rhel87-small @@ -781,7 +781,7 @@ buildvariants: PYTHON_BINARY: /opt/python/3.9/bin/python3 - name: no-c-ext-rhel8-python3.10 tasks: - - name: .replica_set .noauth .nossl .sync_async + - name: .replica_set .noauth .nossl !.sync_async display_name: No C Ext RHEL8 Python3.10 run_on: - rhel87-small @@ -790,7 +790,7 @@ buildvariants: PYTHON_BINARY: /opt/python/3.10/bin/python3 - name: no-c-ext-rhel8-python3.11 tasks: - - name: .sharded_cluster .noauth .nossl .sync_async + - name: .sharded_cluster .noauth .nossl !.sync_async display_name: No C Ext RHEL8 Python3.11 run_on: - rhel87-small @@ -799,7 +799,7 @@ buildvariants: PYTHON_BINARY: /opt/python/3.11/bin/python3 - name: no-c-ext-rhel8-python3.12 tasks: - - name: .standalone .noauth .nossl .sync_async + - name: .standalone .noauth .nossl !.sync_async display_name: No C Ext RHEL8 Python3.12 run_on: - rhel87-small @@ -808,7 +808,7 @@ buildvariants: PYTHON_BINARY: /opt/python/3.12/bin/python3 - name: no-c-ext-rhel8-python3.13 tasks: - - name: .replica_set .noauth .nossl .sync_async + - name: .replica_set .noauth .nossl !.sync_async display_name: No C Ext RHEL8 Python3.13 run_on: - rhel87-small diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index 113795d4af..7d6108e9be 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -588,7 +588,7 @@ def create_no_c_ext_variants(): variants = [] host = DEFAULT_HOST for python, topology in zip_cycle(CPYTHONS, TOPOLOGIES): - tasks = [f".{topology} .noauth .nossl .sync_async"] + tasks = [f".{topology} .noauth .nossl !.sync_async"] expansions = dict() handle_c_ext(C_EXTS[0], expansions) display_name = get_display_name("No C Ext", host, python=python) diff --git a/.evergreen/scripts/setup_tests.py b/.evergreen/scripts/setup_tests.py index f81c3ed2f9..96c138b4ae 100644 --- a/.evergreen/scripts/setup_tests.py +++ b/.evergreen/scripts/setup_tests.py @@ -21,7 +21,7 @@ ROOT = HERE.parent.parent ENV_FILE = HERE / "test-env.sh" DRIVERS_TOOLS = os.environ.get("DRIVERS_TOOLS", "").replace(os.sep, "/") -PLATFORM = "windows" if os.name == "nt" else sys.platform +PLATFORM = "windows" if os.name == "nt" else sys.platform.lower() LOGGER = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO, format="%(levelname)-8s %(message)s") @@ -230,7 +230,7 @@ def handle_test_env() -> None: write_env("SSL", SSL) # Skip CSOT tests on non-linux platforms. - if sys.platform != "Linux": + if PLATFORM != "linux": write_env("SKIP_CSOT_TESTS") # Set an environment variable for the test name and sub test name. From 722db19deb74dd1bf448198a02f7ad454d34a86d Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 21 Feb 2025 10:07:12 -0600 Subject: [PATCH 42/42] remove debug --- .evergreen/run-tests.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 5757f07ac7..f3c71b41ff 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -23,8 +23,6 @@ fi if [ -f $SCRIPT_DIR/scripts/test-env.sh ]; then echo "Sourcing test inputs" . $SCRIPT_DIR/scripts/test-env.sh - cat $SCRIPT_DIR/scripts/test-env.sh - exit 1 else echo "Missing test inputs, please run 'just setup-test'" fi