2026-05-21 22:22:08 -05:00
|
|
|
package config
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"strings"
|
|
|
|
|
"testing"
|
|
|
|
|
)
|
|
|
|
|
|
2026-11-30 01:41:12 +00:00
|
|
|
func TestRetiredAudioCacheAndSpoolSettingsAreRejected(t *testing.T) {
|
|
|
|
|
for _, field := range []string{"cache", "spool"} {
|
|
|
|
|
t.Run(field, func(t *testing.T) {
|
|
|
|
|
pipeline, session := writeConfigFiles(t, "workspace:\n root: /tmp/narratio\n"+field+":\n root: /tmp/old\n", "session_id: 2026-05-03\ninputs:\n audio_dir: ./audio\n")
|
|
|
|
|
_, err := Load(pipeline, session)
|
|
|
|
|
if err == nil || !strings.Contains(configurationErrorText(err), "decode.unknown_field") {
|
|
|
|
|
t.Fatalf("Load() = %v, want unknown field error", err)
|
|
|
|
|
}
|
|
|
|
|
})
|
2026-05-21 22:22:08 -05:00
|
|
|
}
|
|
|
|
|
}
|