MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / TestHandler_AgentNotFound

Function TestHandler_AgentNotFound

internal/ws/handler_test.go:187–202  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

185}
186
187func TestHandler_AgentNotFound(t *testing.T) {
188 hub := NewHub()
189 defer hub.Close()
190 store := &mockStore{
191 user: newTestUser(),
192 agentErr: fmt.Errorf("not found"),
193 }
194 handler := NewHandler(hub, store)
195 srv := startServer(t, handler)
196
197 resp := doHTTP(t, srv, "bot@agents.e2a.dev", "valid_key")
198 defer resp.Body.Close()
199 if resp.StatusCode != http.StatusNotFound {
200 t.Fatalf("expected 404, got %d", resp.StatusCode)
201 }
202}
203
204func TestHandler_NotOwner(t *testing.T) {
205 hub := NewHub()

Callers

nothing calls this directly

Calls 6

CloseMethod · 0.95
NewHubFunction · 0.85
newTestUserFunction · 0.85
NewHandlerFunction · 0.85
startServerFunction · 0.85
doHTTPFunction · 0.85

Tested by

no test coverage detected