Expose native configuration inspection scopes

This commit is contained in:
2026-11-20 05:02:46 +00:00
parent 1e67c429b7
commit c3c6849bed
31 changed files with 412 additions and 1567 deletions

View File

@@ -23,18 +23,3 @@ func TestConfigDiffUsesEscapedPointersAndAtomicLists(t *testing.T) {
}
}
}
func TestConfigSourcesReportsEmptyOptionalImportAndNormalization(t *testing.T) {
dir := t.TempDir()
root := filepath.Join(dir, "pipeline.yml")
mustWriteTestFile(t, root, "config:\n imports:\n - path: absent.yml\nworkspace: {root: ./work}\nwhisperx: {transcribe_url: 'https://example.test/transcribe'}\n")
var output bytes.Buffer
if err := ConfigSources(context.Background(), []string{"--config", root}, &output); err != nil {
t.Fatal(err)
}
for _, want := range []string{"empty_import\t/config/imports/0\tpath\t" + root, "workspace.root\tresolution\tresolution", "workspace.root\troot\t" + root} {
if !strings.Contains(output.String(), want) {
t.Fatalf("sources lack %q: %s", want, output.String())
}
}
}