test(dashboard): enable DASHBOARD_AUTH in SSE cookie test so it can't hang

Auth is off by default; without it the stream opens and the test never returns,
blocking the full suite at ~17%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014y1sJNe6mkWwFMwkWmCg8J
This commit is contained in:
2026-10-01 18:01:37 +00:00
parent 5bc52fe67f
commit 94d5987ac6

View File

@@ -584,8 +584,10 @@ class TestPlanningEndpoints:
class TestSseAuth:
def test_sse_stream_requires_cookie(self, stub):
# No Cookie header → handler short-circuits with 401.
def test_sse_stream_requires_cookie(self, stub, monkeypatch):
# Auth is off by default (tailnet-only); without it the stream opens
# and never returns. No Cookie header → handler short-circuits with 401.
monkeypatch.setenv("DASHBOARD_AUTH", "on")
stub.path = "/api/projects/stream"
stub.command = "GET"
stub.handle_projects_stream()