Migrate facade tests to the new configuration contracts

This commit is contained in:
2026-11-21 14:36:07 +00:00
parent cf03bca753
commit bab3422e62
47 changed files with 183 additions and 155 deletions

View File

@@ -11,6 +11,14 @@ import (
"go.maximumdirect.net/promptkit"
)
func mountSettingsInputs(inputs []configkit.Input) []configkit.Input {
result := append([]configkit.Input(nil), inputs...)
for i := range result {
result[i].Destination = configkit.Keys("promptkit")
}
return result
}
type fakeLLMClient struct {
response *promptkit.GenerateResponse
responses []*promptkit.GenerateResponse
@@ -59,7 +67,7 @@ func newSimpleEngine(t *testing.T, content string, options ...promptkit.Option)
func simpleConfig(content string) promptkit.Config {
return promptkit.Config{Sources: promptkit.ConfigurationSources{
Main: &configkit.Input{Source: configkit.Mapping("consumer test", map[string]any{
Main: &configkit.Input{Destination: configkit.Keys("promptkit"), Source: configkit.Mapping("consumer test", map[string]any{
"profiles": []any{map[string]any{"id": "profile",
"endpoint": "http://example.test/v1", "model": "model",
}},