Admin endpoint: ENV/file admin key, --reset-admin-key, settings API wired into ratelimit/max-bytes/default-expiry/burn-window (#40)
This commit is contained in:
+5
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user