MCPcopy Create free account
hub / github.com/github/gh-aw / TestWorkflowLogMetricsConversion

Function TestWorkflowLogMetricsConversion

pkg/cli/copilot_agent_test.go:399–419  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

397}
398
399func TestWorkflowLogMetricsConversion(t *testing.T) {
400 // Test that our metrics are compatible with workflow.LogMetrics
401 logContent := `
402Task iteration 1
403Tool call: github
404ERROR: Test error
405`
406 metrics := ParseCopilotCodingAgentLogMetrics(logContent, false)
407
408 // Verify the returned type is workflow.LogMetrics
409 var _ = metrics
410
411 // Verify fields are properly set
412 if metrics.Turns != 1 {
413 t.Errorf("Expected 1 turn, got %d", metrics.Turns)
414 }
415
416 if len(metrics.ToolCalls) < 1 {
417 t.Error("Expected tool calls to be extracted")
418 }
419}

Callers

nothing calls this directly

Calls 3

ErrorfMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected