Skip to content

Commit 7b7d10f

Browse files
committed
fix index management and aws auth
1 parent bc6af39 commit 7b7d10f

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

.evergreen/scripts/setup-tests.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@
2121
logging.basicConfig(level=logging.INFO, format="%(levelname)-8s %(message)s")
2222

2323
# Passthrough environment variables.
24-
PASS_THROUGH_ENV = [
25-
"GREEN_FRAMEWORK",
26-
"NO_EXT",
27-
"MONGODB_API_VERSION",
28-
"MONGODB_URI",
29-
]
24+
PASS_THROUGH_ENV = ["GREEN_FRAMEWORK", "NO_EXT", "MONGODB_API_VERSION"]
3025

3126
# Map the test name to a test suite.
3227
TEST_SUITE_MAP = {
@@ -132,10 +127,10 @@ def handle_test_env() -> None:
132127
AUTH = os.environ.get("AUTH", "noauth")
133128
LOGGER.info(f"HI, {AUTH=}") # TODO remove
134129
if opts.auth or "auth" in test_name:
135-
# Only 'auth_aws ecs' shouldn't have extra auth set.
136-
if not (test_name == "auth_aws" and sub_test_name == "ecs"):
137-
LOGGER.info(f"Why am I setting this? '{sub_test_name=}'")
138-
AUTH = "auth"
130+
AUTH = "auth"
131+
# 'auth_aws ecs' shouldn't have extra auth set.
132+
if test_name == "auth_aws" and sub_test_name == "ecs":
133+
AUTH = "noauth"
139134
SSL = os.environ.get("SSL", "nossl")
140135
if opts.ssl:
141136
SSL = "ssl"
@@ -198,6 +193,7 @@ def handle_test_env() -> None:
198193
config = read_env(f"{DRIVERS_TOOLS}/.evergreen/atlas/secrets-export.sh")
199194
DB_USER = config["DRIVERS_ATLAS_LAMBDA_USER"]
200195
DB_PASSWORD = config["DRIVERS_ATLAS_LAMBDA_PASSWORD"]
196+
write_env("MONGODB_URI", config["MONGODB_URI"])
201197
else:
202198
DB_USER = "bob"
203199
DB_PASSWORD = "pwd123" # noqa: S105

0 commit comments

Comments
 (0)