Migrate facade tests to the new configuration contracts
This commit is contained in:
@@ -122,7 +122,7 @@ func TestBundledSmokeHTTPDefaults(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBundledSmokeSelectionUsesEffectiveConfiguration(t *testing.T) {
|
||||
replacement := configkit.Input{Source: configkit.Mapping("replacement", map[string]any{"profiles": []any{map[string]any{"id": "gpt-luna-latest", "backend": "openrouter", "model": "replacement"}}})}
|
||||
replacement := configkit.Input{Destination: configkit.Keys("promptkit"), Source: configkit.Mapping("replacement", map[string]any{"profiles": []any{map[string]any{"id": "gpt-luna-latest", "backend": "openrouter", "model": "replacement"}}})}
|
||||
replacementClient := &fakeLLMClient{response: &promptkit.GenerateResponse{Content: "PROMPTKIT_OK"}}
|
||||
replacementEngine, err := promptkit.NewEngine(promptkit.Config{Sources: promptkit.ConfigurationSources{Main: &replacement}}, promptkit.WithLLMClient(replacementClient))
|
||||
if err != nil {
|
||||
@@ -137,7 +137,7 @@ func TestBundledSmokeSelectionUsesEffectiveConfiguration(t *testing.T) {
|
||||
if err != nil || mismatch == nil || !mismatch.Completed {
|
||||
t.Fatalf("concluded mismatch = %+v, %v", mismatch, err)
|
||||
}
|
||||
input := configkit.Input{Source: configkit.Mapping("application", map[string]any{
|
||||
input := configkit.Input{Destination: configkit.Keys("promptkit"), Source: configkit.Mapping("application", map[string]any{
|
||||
"backends": []any{map[string]any{"id": "openrouter", "endpoint": "https://example.invalid/v1", "smoke_tests": map[string]any{"default_profile": "custom"}}},
|
||||
"profiles": []any{map[string]any{"id": "gpt-luna-latest", "backend": "openrouter", "model": "replacement"}, map[string]any{"id": "custom", "backend": "openrouter", "model": "custom-model"}},
|
||||
"prompts": []any{map[string]any{"id": "prompt", "default_profile": "free", "messages": []any{map[string]any{"role": "user", "content": "private application marker"}}, "output": map[string]any{"format": "text", "validation_mode": "none"}}},
|
||||
|
||||
Reference in New Issue
Block a user