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:
yuneng-jiang 2026-10-19 15:06:02 -07:00 • committed by GitHub
parent cf9ebeda07
commit b110c8cfa7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)