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

Function TestFeedback_MessageTooLong

internal/agent/api_test.go:206–217  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

204}
205
206func TestFeedback_MessageTooLong(t *testing.T) {
207 server, _, _ := setupAPI(t)
208
209 msg := bytes.Repeat([]byte("a"), 5001)
210 payload := fmt.Sprintf(`{"message":"%s"}`, string(msg))
211 resp, _ := http.Post(server.URL+"/api/feedback", "application/json", bytes.NewBufferString(payload))
212 defer resp.Body.Close()
213
214 if resp.StatusCode != 400 {
215 t.Errorf("status = %d, want 400 for message too long", resp.StatusCode)
216 }
217}
218
219func TestFeedback_RateLimit(t *testing.T) {
220 server, _, _ := setupAPI(t)

Callers

nothing calls this directly

Calls 2

setupAPIFunction · 0.85
CloseMethod · 0.45

Tested by

no test coverage detected