Migrate facade tests to the new configuration contracts
This commit is contained in:
@@ -46,7 +46,7 @@ func TestMixedSchemaCollectionsAndPreparedLifecycle(t *testing.T) {
|
||||
}, opens: map[string]int{}}
|
||||
defaultFS := configkit.NewFilesystem("embedded", defaults)
|
||||
operatorFS := configkit.NewFilesystem("operator", operator)
|
||||
base := configkit.Input{Source: configkit.Mapping("embedded definitions", map[string]any{
|
||||
base := configkit.Input{Destination: configkit.Keys("promptkit"), Source: configkit.Mapping("embedded definitions", map[string]any{
|
||||
"schema_root": "app",
|
||||
"profiles": []any{map[string]any{"id": "profile", "endpoint": "https://example.invalid/v1", "model": "model"}},
|
||||
"prompts": []any{mixedPrompt("fallback", mixedOutput("schema_path", "schema.json"))},
|
||||
@@ -63,11 +63,11 @@ func TestMixedSchemaCollectionsAndPreparedLifecycle(t *testing.T) {
|
||||
}), Filesystem: &configkit.FilesystemContext{FS: &defaultFS, Root: ".", BaseDir: "embedded"}}
|
||||
operatorOutput := mixedOutput("schema_file", "schema.json")
|
||||
operatorOutput["repair_attempts"] = 1
|
||||
overlay := configkit.Input{Source: configkit.Mapping("operator definitions", map[string]any{
|
||||
overlay := configkit.Input{Destination: configkit.Keys("promptkit"), Source: configkit.Mapping("operator definitions", map[string]any{
|
||||
"collections": map[string]any{"alpha": map[string]any{"schema_root": "root", "prompts": []any{
|
||||
mixedPrompt("replaced", operatorOutput),
|
||||
map[string]any{"id": "inherited", "extends": map[string]any{"id": "base"}},
|
||||
map[string]any{"id": "switched", "extends": map[string]any{"id": "base"}, "output": map[string]any{"schema_file": nil, "schema": false}},
|
||||
map[string]any{"id": "switched", "extends": map[string]any{"id": "base"}, "output": map[string]any{"schema_file": nil, "schema": false, "repair_attempts": 0}},
|
||||
mixedPrompt("malformed", mixedOutput("schema_file", "malformed.json")),
|
||||
}}},
|
||||
}), Filesystem: &configkit.FilesystemContext{FS: &operatorFS, Root: ".", BaseDir: "operator"}}
|
||||
|
||||
Reference in New Issue
Block a user