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

Function TestInvalidateLimits_503WhenSecretUnset

internal/agent/limits_api_test.go:102–113  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

100}
101
102func TestInvalidateLimits_503WhenSecretUnset(t *testing.T) {
103 server, _, _, _ := setupAPIWithLimits(t, "")
104
105 body := []byte(`{"user_id":"u_x"}`)
106 req, _ := http.NewRequest("POST", server.URL+"/api/internal/limits/invalidate", bytes.NewReader(body))
107 req.Header.Set("X-E2A-Internal-Signature", "anything")
108 resp, _ := http.DefaultClient.Do(req)
109 defer resp.Body.Close()
110 if resp.StatusCode != http.StatusServiceUnavailable {
111 t.Errorf("no-secret config: status = %d, want 503", resp.StatusCode)
112 }
113}

Callers

nothing calls this directly

Calls 2

setupAPIWithLimitsFunction · 0.85
CloseMethod · 0.45

Tested by

no test coverage detected