Admin endpoint: ENV/file admin key, --reset-admin-key, settings API wired into ratelimit/max-bytes/default-expiry/burn-window (#40)
CI / test (push) Successful in 22s
CI / docker (push) Skipped

This commit is contained in:
2026-09-09 00:44:02 -05:00
parent 03600b2ed5
commit a3349b4a98
10 changed files with 562 additions and 11 deletions
+5 -1
View File
@@ -23,7 +23,11 @@ func newTestServer(t *testing.T) *apiServer {
}
webUIInstance = ui
}
return &apiServer{store: store, cfg: Config{MaxTextBytes: 1024 * 1024}}
cfg := Config{MaxTextBytes: 1024 * 1024}
ss := newTestSettingsStore(t, cfg)
globalSettingsFn = ss.get
t.Cleanup(func() { globalSettingsFn = nil })
return &apiServer{store: store, cfg: cfg, settings: ss, adminKey: "test-admin-key"}
}
func postJSON(t *testing.T, h http.Handler, path string, body any) *httptest.ResponseRecorder {