(t *testing.T)
| 185 | } |
| 186 | |
| 187 | func 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 | |
| 204 | func TestHandler_NotOwner(t *testing.T) { |
| 205 | hub := NewHub() |
nothing calls this directly
no test coverage detected