Skip to content

Commit e2cdea3

Browse files
[async] apply test fix
1 parent 601e2c6 commit e2cdea3

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

test/unit/aio/test_connection_async_unit.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,8 +644,7 @@ async def test_workload_identity_provider_is_required_for_wif_authenticator(
644644
await snowflake.connector.aio.connect(
645645
account="account",
646646
authenticator="WORKLOAD_IDENTITY",
647-
# TODO: fix after applying #2469
648-
provider=provider_param,
647+
workload_identity_provider=provider_param,
649648
)
650649
assert (
651650
"workload_identity_provider must be set to one of AWS,AZURE,GCP,OIDC when authenticator is WORKLOAD_IDENTITY"

test/unit/test_connection.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -669,12 +669,14 @@ def test_workload_identity_provider_is_required_for_wif_authenticator(
669669
snowflake.connector.connect(
670670
account="account",
671671
authenticator="WORKLOAD_IDENTITY",
672-
provider=provider_param,
672+
workload_identity_provider=provider_param,
673673
)
674-
assert (
674+
expected_error_msg = (
675675
"workload_identity_provider must be set to one of AWS,AZURE,GCP,OIDC when authenticator is WORKLOAD_IDENTITY"
676-
in str(excinfo.value)
676+
if provider_param is None
677+
else f"Unknown workload_identity_provider: '{provider_param}'. Expected one of: AWS, AZURE, GCP, OIDC"
677678
)
679+
assert expected_error_msg in str(excinfo.value)
678680

679681

680682
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)