File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,6 @@ def _get_target_dir(sub_test_name: str) -> str:
25
25
def setup_oidc (sub_test_name : str ) -> dict [str , str ] | None :
26
26
target_dir = _get_target_dir (sub_test_name )
27
27
env = os .environ .copy ()
28
- if sub_test_name == "eks" and "AWS_ACCESS_KEY_ID" in os .environ :
29
- # Remove AWS creds that would interfere with kubectl access.
30
- for key in ["AWS_ACCESS_KEY_ID" , "AWS_SECRET_ACCESS_KEY" , "AWS_SESSION_TOKEN" ]:
31
- if key in os .environ :
32
- del os .environ [key ]
33
28
if sub_test_name == "azure" :
34
29
env ["AZUREOIDC_VMNAME_PREFIX" ] = "PYTHON_DRIVER"
35
30
if "-remote" not in sub_test_name :
@@ -81,6 +76,11 @@ def test_oidc_send_to_remote(sub_test_name: str) -> None:
81
76
elif sub_test_name in K8S_NAMES :
82
77
env ["K8S_DRIVERS_TAR_FILE" ] = TMP_DRIVER_FILE
83
78
env ["K8S_TEST_CMD" ] = "OIDC_ENV=k8s ./.evergreen/run-mongodb-oidc-test.sh"
79
+ if sub_test_name == "eks" and "AWS_ACCESS_KEY_ID" in os .environ :
80
+ # Remove AWS creds that would interfere with kubectl access.
81
+ for key in ["AWS_ACCESS_KEY_ID" , "AWS_SECRET_ACCESS_KEY" , "AWS_SESSION_TOKEN" ]:
82
+ if key in os .environ :
83
+ del os .environ [key ]
84
84
run_command (f"bash { target_dir } /run-driver-test.sh" , env = env )
85
85
86
86
You can’t perform that action at this time.
0 commit comments