WIP: Access cache

This commit is contained in:
binwiederhier
2026-05-28 17:13:14 -04:00
parent 47044c632e
commit 25520c4505
11 changed files with 601 additions and 64 deletions
+5
View File
@@ -9,6 +9,7 @@ import (
"os"
"path/filepath"
"testing"
"time"
)
func TestCLI_User_Add(t *testing.T) {
@@ -128,6 +129,10 @@ func newTestServerWithAuth(t *testing.T) (s *server.Server, conf *server.Config,
conf.File = configFile
conf.AuthFile = filepath.Join(t.TempDir(), "user.db")
conf.AuthDefault = user.PermissionDenyAll
// Tight interval so cross-process writes from the `ntfy access`/`ntfy user`
// CLI commands (which run via a separate Manager) propagate to the server's
// ACL cache within tens of ms instead of the default 5s.
conf.AuthAccessCacheReloadInterval = 25 * time.Millisecond
s, port = test.StartServerWithConfig(t, conf)
return
}