test(discord): fix component-auth expectations after fail-closed change (#f6f363662)

Pre-existing main breakage inherited via rebase, not slack-migration fallout:
f6f363662 made discord component-button auth fail closed when no allowlist is
set but only updated test_discord_component_auth.py. test_discord_model_picker
and two test_discord_clarify_buttons tests drove the authorized-proceed path
with an empty allowlist, which now correctly rejects. Give the interacting
user an allowlist entry so the proceed path runs (dedicated *_unauthorized_*
tests still cover rejection). Same fix as #41284; both PRs un-break main's
currently-red CI.
This commit is contained in:
teknium1 2026-06-07 07:10:09 -07:00
parent c2eae4795b
commit 9ec2a470f9
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -174,7 +174,7 @@ class TestClarifyChoiceResolve:
view = ClarifyChoiceView(
choices=["alpha"],
clarify_id="cidGone",
allowed_user_ids=set(),
allowed_user_ids={"42"},
)
interaction = _make_interaction()
# Doesn't raise; resolve_gateway_clarify returns False quietly
@ -245,7 +245,7 @@ class TestClarifyOtherButton:
view = ClarifyChoiceView(
choices=["x", "y"],
clarify_id="cidD",
allowed_user_ids=set(),
allowed_user_ids={"42"},
)
interaction = _make_interaction()

View file

@ -54,7 +54,7 @@ async def test_model_picker_clears_controls_before_running_switch_callback():
current_provider="copilot",
session_key="session-1",
on_model_selected=on_model_selected,
allowed_user_ids=set(),
allowed_user_ids={"123"},
)
view._selected_provider = "copilot"