Make opt-in flag

This commit is contained in:
binwiederhier
2026-05-31 14:28:04 -04:00
parent 301be79f0a
commit 204723f3c0
10 changed files with 236 additions and 43 deletions
+2 -5
View File
@@ -9,7 +9,6 @@ import (
"os"
"path/filepath"
"testing"
"time"
)
func TestCLI_User_Add(t *testing.T) {
@@ -129,10 +128,8 @@ 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
// Cache is off by default (matches self-hoster setup), so the server reads
// authorizations directly from the DB and sees CLI mutations immediately.
s, port = test.StartServerWithConfig(t, conf)
return
}