Resolve producer modes turn allowances cache controls and shared workers

This commit is contained in:
2026-11-21 22:49:41 +00:00
parent cc14a7a5cc
commit 40fbcc61b1
26 changed files with 655 additions and 1405 deletions

View File

@@ -0,0 +1,21 @@
package config
import (
"errors"
"path/filepath"
"testing"
)
func TestDefaultCacheRootUsesOneApplicationDirectory(t *testing.T) {
root, err := DefaultCacheRoot(func() (string, error) { return "/tmp/user-cache", nil })
if err != nil {
t.Fatal(err)
}
if root != filepath.Join("/tmp/user-cache", "notarius") {
t.Fatalf("root = %q", root)
}
failure := errors.New("cache home unavailable")
if _, err := DefaultCacheRoot(func() (string, error) { return "", failure }); !errors.Is(err, failure) {
t.Fatalf("lost cache discovery error: %v", err)
}
}