Add chunk plan cache configuration and storage

This commit is contained in:
2026-07-18 00:07:53 +00:00
parent 7844c0a93f
commit ebd449d847
13 changed files with 843 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
package pipeline
import "testing"
func TestParseChunkCacheMode(t *testing.T) {
for _, value := range []ChunkCacheMode{ChunkCacheAuto, ChunkCacheBypass, ChunkCacheRefresh} {
got, err := ParseChunkCacheMode(string(value))
if err != nil || got != value {
t.Fatalf("ParseChunkCacheMode(%q) = %q, %v", value, got, err)
}
if err := value.Validate(); err != nil {
t.Fatalf("%q.Validate() error = %v", value, err)
}
}
for _, value := range []string{"", "enabled", "AUTO", "auto,refresh"} {
if _, err := ParseChunkCacheMode(value); err == nil {
t.Fatalf("ParseChunkCacheMode(%q) error = nil, want error", value)
}
}
}