mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-25 05:54:53 +00:00
test(integration): check SSO sign-in removal without reaching the public internet (#47409)
The SSO removal test configured Google sign-in, which fetches its discovery document from accounts.google.com before redirecting. CircleCI blocks that egress, so the test failed on every main run since #46709 added it. Microsoft sign-in builds its endpoints locally and goes through the same SSO environment variable handling, so the test now uses it
This commit is contained in:
parent
cf9ebeda07
commit
b110c8cfa7
1 changed files with 3 additions and 3 deletions
|
|
@ -1547,8 +1547,8 @@ def test_an_sso_client_removed_from_db_environment_variables_stops_sign_in_on_ev
|
|||
"DATABASE_URL_READ_REPLICA",
|
||||
"GENERIC_CLIENT_ID",
|
||||
"GOOGLE_CLIENT_ID",
|
||||
"GOOGLE_CLIENT_SECRET",
|
||||
"MICROSOFT_CLIENT_ID",
|
||||
"MICROSOFT_CLIENT_SECRET",
|
||||
"PROXY_BASE_URL",
|
||||
)
|
||||
with (
|
||||
|
|
@ -1567,7 +1567,7 @@ def test_an_sso_client_removed_from_db_environment_variables_stops_sign_in_on_ev
|
|||
response: Final = first.request(
|
||||
"POST",
|
||||
"/config/update",
|
||||
{"environment_variables": {"GOOGLE_CLIENT_ID": client_id, "GOOGLE_CLIENT_SECRET": secret}},
|
||||
{"environment_variables": {"MICROSOFT_CLIENT_ID": client_id, "MICROSOFT_CLIENT_SECRET": secret}},
|
||||
)
|
||||
assert response.status_code == 200, response.text
|
||||
|
||||
|
|
@ -1584,7 +1584,7 @@ def test_an_sso_client_removed_from_db_environment_variables_stops_sign_in_on_ev
|
|||
moved: Final = first.request(
|
||||
"PATCH",
|
||||
"/update/sso_settings",
|
||||
{"google_client_id": sso_table_client, "google_client_secret": "sso-table-secret"},
|
||||
{"microsoft_client_id": sso_table_client, "microsoft_client_secret": "sso-table-secret"},
|
||||
)
|
||||
assert moved.status_code == 200, moved.text
|
||||
eventually(sign_in_clients, lambda clients: clients == (sso_table_client,) * 2, seconds=30)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue