Use native configuration validation and diagnostics
This commit is contained in:
@@ -39,7 +39,7 @@ inputs:
|
||||
audio_dir: ./audio
|
||||
`)
|
||||
_, err := Load(pipelinePath, sessionPath)
|
||||
if err == nil || !strings.Contains(err.Error(), "strict decode failed") {
|
||||
if err == nil || !strings.Contains(configurationErrorText(err), "decode.unknown_field") {
|
||||
t.Fatalf("Load() error = %v, want strict decode failed", err)
|
||||
}
|
||||
}
|
||||
@@ -55,7 +55,7 @@ inputs:
|
||||
audio_dir: ./audio
|
||||
`)
|
||||
_, err := Load(pipelinePath, sessionPath)
|
||||
if err == nil || !strings.Contains(err.Error(), "pipeline.cache.root is required") {
|
||||
if err == nil || !strings.Contains(configurationErrorText(err), "pipeline.cache.root is required") {
|
||||
t.Fatalf("Load() error = %v, want cache root error", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user