Update configuration fixtures for native composition

This commit is contained in:
2026-11-17 20:50:07 +00:00
parent 61ceab786c
commit 716bc62991
7 changed files with 94 additions and 9 deletions

View File

@@ -197,6 +197,33 @@ pipelines:
}
}
func TestNestedConfigOptionRemainsApplicationData(t *testing.T) {
loaded, err := loadConfigSource(configkit.Bytes("options.yml", []byte(`version: 5
pipelines:
session:
input:
module: input
options:
config: {imports: ordinary-data}
`)), LoadOptions{})
if err != nil {
t.Fatal(err)
}
value := loaded.Config.Pipelines["session"].Input.Options["config"].(map[string]any)["imports"]
if value != "ordinary-data" {
t.Fatalf("nested config option = %#v", value)
}
}
func TestOverrideCannotRepairTypedDecodeFailure(t *testing.T) {
_, err := loadConfigSource(configkit.Bytes("invalid.yml", []byte("version: 5\nconcurrency: {total_llm: invalid}\n")), LoadOptions{
Overrides: []configkit.Override{{Path: configkit.Keys("concurrency", "total_llm"), Value: 2, Flag: "--total-llm"}},
})
if err == nil {
t.Fatal("override unexpectedly repaired invalid typed input")
}
}
func TestLoadedConfigRedactsSensitiveNestedOptions(t *testing.T) {
t.Parallel()