package config import ( "testing" "time" ) func TestValidateAcceptsThinMode(t *testing.T) { cfg := Default() cfg.Mode = ModeThin cfg.ThinCacheTTL = 24 * time.Hour cfg.ThinCacheMaxEntries = 10 if err := cfg.Validate(); err != nil { t.Fatalf("validate thin mode: %v", err) } } func TestValidateRejectsInvalidThinCacheConfig(t *testing.T) { cfg := Default() cfg.Mode = ModeThin cfg.ThinCacheTTL = 0 if err := cfg.Validate(); err == nil { t.Fatalf("expected thin_cache_ttl validation error") } cfg = Default() cfg.Mode = ModeThin cfg.ThinCacheMaxEntries = 0 if err := cfg.Validate(); err == nil { t.Fatalf("expected thin_cache_max_entries validation error") } }