Skip to content

Commit 00665af

Browse files
fixup! Make the changes backward compatible
1 parent 6f50a50 commit 00665af

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

test/unit/test_oauth_token.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ def test_oauth_code_successful_flow(
124124
omit_oauth_urls_check,
125125
) -> None:
126126
monkeypatch.setenv("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT", "true")
127-
monkeypatch.setenv("SNOWFLAKE_OAUTH_SOCKET_PORT", "8009")
128127

129128
wiremock_client.import_mapping(
130129
wiremock_oauth_authorization_code_dir / "successful_flow.json"
@@ -167,7 +166,6 @@ def test_oauth_code_invalid_state(
167166
omit_oauth_urls_check,
168167
) -> None:
169168
monkeypatch.setenv("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT", "true")
170-
monkeypatch.setenv("SNOWFLAKE_OAUTH_SOCKET_PORT", "8009")
171169

172170
wiremock_client.import_mapping(
173171
wiremock_oauth_authorization_code_dir / "invalid_state_error.json"
@@ -203,7 +201,6 @@ def test_oauth_code_scope_error(
203201
monkeypatch,
204202
) -> None:
205203
monkeypatch.setenv("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT", "true")
206-
monkeypatch.setenv("SNOWFLAKE_OAUTH_SOCKET_PORT", "8009")
207204

208205
wiremock_client.import_mapping(
209206
wiremock_oauth_authorization_code_dir / "invalid_scope_error.json"
@@ -240,7 +237,6 @@ def test_oauth_code_token_request_error(
240237
omit_oauth_urls_check,
241238
) -> None:
242239
monkeypatch.setenv("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT", "true")
243-
monkeypatch.setenv("SNOWFLAKE_OAUTH_SOCKET_PORT", "8009")
244240

245241
with WiremockClient() as wiremock_client:
246242
wiremock_client.import_mapping(
@@ -279,7 +275,6 @@ def test_oauth_code_browser_timeout(
279275
omit_oauth_urls_check,
280276
) -> None:
281277
monkeypatch.setenv("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT", "true")
282-
monkeypatch.setenv("SNOWFLAKE_OAUTH_SOCKET_PORT", "8009")
283278

284279
wiremock_client.import_mapping(
285280
wiremock_oauth_authorization_code_dir
@@ -321,7 +316,6 @@ def test_oauth_code_custom_urls(
321316
omit_oauth_urls_check,
322317
) -> None:
323318
monkeypatch.setenv("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT", "true")
324-
monkeypatch.setenv("SNOWFLAKE_OAUTH_SOCKET_PORT", "8009")
325319

326320
wiremock_client.import_mapping(
327321
wiremock_oauth_authorization_code_dir / "external_idp_custom_urls.json"
@@ -365,7 +359,6 @@ def test_oauth_code_local_application_custom_urls_successful_flow(
365359
omit_oauth_urls_check,
366360
) -> None:
367361
monkeypatch.setenv("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT", "true")
368-
monkeypatch.setenv("SNOWFLAKE_OAUTH_SOCKET_PORT", "8009")
369362

370363
wiremock_client.import_mapping(
371364
wiremock_oauth_authorization_code_dir
@@ -410,7 +403,6 @@ def test_oauth_code_successful_refresh_token_flow(
410403
omit_oauth_urls_check,
411404
) -> None:
412405
monkeypatch.setenv("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT", "true")
413-
monkeypatch.setenv("SNOWFLAKE_OAUTH_SOCKET_PORT", "8009")
414406

415407
wiremock_client.import_mapping(
416408
wiremock_generic_mappings_dir / "snowflake_login_failed.json"
@@ -471,7 +463,6 @@ def test_oauth_code_expired_refresh_token_flow(
471463
omit_oauth_urls_check,
472464
) -> None:
473465
monkeypatch.setenv("SNOWFLAKE_AUTH_SOCKET_REUSE_PORT", "true")
474-
monkeypatch.setenv("SNOWFLAKE_OAUTH_SOCKET_PORT", "8009")
475466

476467
wiremock_client.import_mapping(
477468
wiremock_generic_mappings_dir / "snowflake_login_failed.json"
@@ -555,10 +546,6 @@ def test_client_creds_successful_flow(
555546
monkeypatch,
556547
temp_cache,
557548
) -> None:
558-
monkeypatch.setenv(
559-
"SNOWFLAKE_OAUTH_SOCKET_PORT", wiremock_client.wiremock_http_port
560-
)
561-
562549
wiremock_client.import_mapping(
563550
wiremock_oauth_client_creds_dir / "successful_flow.json"
564551
)
@@ -609,10 +596,6 @@ def test_client_creds_token_request_error(
609596
wiremock_generic_mappings_dir,
610597
monkeypatch,
611598
) -> None:
612-
monkeypatch.setenv(
613-
"SNOWFLAKE_OAUTH_SOCKET_PORT", wiremock_client.wiremock_http_port
614-
)
615-
616599
wiremock_client.import_mapping(
617600
wiremock_oauth_client_creds_dir / "token_request_error.json"
618601
)
@@ -654,10 +637,6 @@ def test_client_creds_expired_refresh_token_flow(
654637
monkeypatch,
655638
temp_cache,
656639
) -> None:
657-
monkeypatch.setenv(
658-
"SNOWFLAKE_OAUTH_SOCKET_PORT", wiremock_client.wiremock_http_port
659-
)
660-
661640
wiremock_client.import_mapping(
662641
wiremock_generic_mappings_dir / "snowflake_login_failed.json"
663642
)

0 commit comments

Comments
 (0)