(t *testing.T)
| 100 | } |
| 101 | |
| 102 | func 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 | } |
nothing calls this directly
no test coverage detected