Use native configuration validation and diagnostics

This commit is contained in:
2026-11-20 15:22:57 +00:00
parent 7e45ffca43
commit 39b4bddbc9
47 changed files with 351 additions and 308 deletions

View File

@@ -48,7 +48,7 @@ func TestLoadersRejectTrailingYAMLDocuments(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := tt.load()
if err == nil || (!strings.Contains(err.Error(), "exactly one YAML document") && !strings.Contains(err.Error(), "yaml.multiple_documents")) {
if err == nil || (!strings.Contains(configurationErrorText(err), "exactly one YAML document") && !strings.Contains(configurationErrorText(err), "yaml.multiple_documents")) {
t.Fatalf("load error = %v, want exactly-one-document error", err)
}
})