Coordinate aggregate PromptKit smoke tests

This commit is contained in:
2026-10-17 18:57:37 +00:00
parent 20ef7bb8c4
commit 2e14d973ee
4 changed files with 275 additions and 6 deletions

View File

@@ -93,8 +93,13 @@ func TestSmokeTestCommandBindsRequestAndRendersFindings(t *testing.T) {
providerCalls = 0
output.Reset()
outcome = app.Execute(context.Background(), []string{"promptkit", "test", "all"}, commandkit.Streams{Out: &output, Err: io.Discard})
if outcome.Kind != commandkit.OutcomeUsage || providerCalls != 0 || output.Len() != 0 {
t.Fatalf("unexpanded aggregate token = (%#v, %q), calls=%d", outcome, output.String(), providerCalls)
var aggregate struct {
Tests []struct {
Kind string `yaml:"kind"`
} `yaml:"tests"`
}
if outcome.Kind != commandkit.OutcomeSuccess || providerCalls != 4 || yaml.Unmarshal(output.Bytes(), &aggregate) != nil || len(aggregate.Tests) != 4 {
t.Fatalf("aggregate smoke result = (%#v, %q), calls=%d", outcome, output.String(), providerCalls)
}
}