Skip to content

Commit 88ccb83

Browse files
SNOW-2183023: fixed tests
1 parent af2f4a3 commit 88ccb83

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

src/snowflake/connector/wif_util.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,6 @@ def extract_iss_and_sub_without_signature_verification(
131131
return claims["iss"], claims["sub"]
132132

133133

134-
# --------------------------------------------------------------------------- #
135-
# AWS helper utilities (token, credentials, region) #
136-
# --------------------------------------------------------------------------- #
137134
def _imds_v2_token(session_manager: SessionManager | None = None) -> str | None:
138135
res = try_metadata_service_call(
139136
method="PUT",

test/csp_helpers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,7 @@ def sign_request(self, request: AWSRequest) -> None:
291291
date_stamp = utc_now.strftime("%Y%m%d")
292292

293293
request.headers["X-Amz-Date"] = amz_date
294-
if self.util_creds.token:
295-
request.headers["X-Amz-Security-Token"] = self.util_creds.token
294+
request.headers["X-Amz-Security-Token"] = self.util_creds.token
296295

297296
# Host header is already set by the test; add it if a future test forgets
298297
if "Host" not in request.headers:

test/unit/test_auth_workload_identity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def test_internal_signer_vs_botocore_prefix(fake_aws_environment: FakeAwsEnviron
473473
new_prefix = new_hdr.split("Signature=")[0]
474474

475475
# --- headers from real botocore SigV4Auth ----------------------------
476-
creds = fake_aws_environment.util_creds # boto Credentials
476+
creds = fake_aws_environment.boto_creds # boto Credentials
477477
region = fake_aws_environment.region
478478
url = (
479479
f"https://sts.{region}.amazonaws.com/"

0 commit comments

Comments
 (0)