Migrate HTTP and process fixtures without changing wire formats
This commit is contained in:
@@ -33,6 +33,7 @@ func TestCollectorProjectsOnlyTerminalAggregates(t *testing.T) {
|
||||
PromptTokens: promptkit.ObservedTokenCount{Value: 0, Known: true, Complete: true},
|
||||
CompletionTokens: promptkit.ObservedTokenCount{Value: 0, Known: false, Complete: false},
|
||||
TotalTokens: promptkit.ObservedTokenCount{Value: 11, Known: true, Complete: false},
|
||||
ReasoningTokens: promptkit.ObservedTokenCount{Value: 3, Known: true, Complete: true},
|
||||
},
|
||||
})
|
||||
collector.Observe(promptkit.ExecutionEvent{Kind: promptkit.ExecutionRetryDelay, Attempts: 50})
|
||||
@@ -70,6 +71,9 @@ func TestCollectorProjectsOnlyTerminalAggregates(t *testing.T) {
|
||||
t.Fatalf("report exposed %q: %s", forbidden, encoded)
|
||||
}
|
||||
}
|
||||
if strings.Contains(string(encoded), "reasoning_tokens") || strings.Contains(string(encoded), "cost_usd") || strings.Contains(string(encoded), "cache_hit_ratio") {
|
||||
t.Fatalf("unexpected report expansion: %s", encoded)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCollectorHandlesUnknownValuesAndKeepsInvocationsSeparate(t *testing.T) {
|
||||
@@ -129,6 +133,12 @@ func TestCollectorReceivesRealEngineTerminalEvent(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for index := range promptInputs {
|
||||
promptInputs[index].Destination = configkit.Keys("promptkit")
|
||||
}
|
||||
for index := range profileInputs {
|
||||
profileInputs[index].Destination = configkit.Keys("promptkit")
|
||||
}
|
||||
engine, err := promptkit.NewEngine(promptkit.Config{
|
||||
Sources: promptkit.ConfigurationSources{Underlays: []configkit.Underlay{{Inputs: promptInputs}, {Inputs: profileInputs}}},
|
||||
}, promptkit.WithLLMClient(localClient{}))
|
||||
|
||||
Reference in New Issue
Block a user