Files
coder/coderd
Cian Johnston 581f3bdd14 fix(coderd/httpapi): stop writing websocket frames to ResponseRecorder in test (#25284)
The `mockEventSenderWrite` function in `newOneWayWriter()` wrote
WebSocket frame data to both the `net.Pipe` and the
`httptest.ResponseRecorder`. After `websocket.Accept()` calls
`WriteHeader(101)`, the recorder rejects body writes with `"response
status code does not allow body"`. When `HeartbeatClose` sends a ping,
the control frame flush routes through the recorder, producing an
ERROR-level log that `slogtest` catches as a test failure.

Removed the `recorder.Write(b)` call from the write function. The
recorder is only needed for header/status inspection; WebSocket frame
data should only go through the `net.Pipe`.

Closes https://github.com/coder/internal/issues/1521

> 🤖 Generated by Coder Agents
2026-05-14 09:15:14 +01:00
..