Update configuration fixtures for native composition
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user