(t *testing.T)
| 489 | } |
| 490 | |
| 491 | func TestComputeMCPToolsDiff_SortedOutput(t *testing.T) { |
| 492 | run1 := &MCPToolUsageData{} |
| 493 | run2 := &MCPToolUsageData{ |
| 494 | Summary: []MCPToolSummary{ |
| 495 | {ServerName: "z-server", ToolName: "tool", CallCount: 1}, |
| 496 | {ServerName: "a-server", ToolName: "tool", CallCount: 1}, |
| 497 | {ServerName: "m-server", ToolName: "tool", CallCount: 1}, |
| 498 | }, |
| 499 | } |
| 500 | |
| 501 | diff := computeMCPToolsDiff(run1, run2) |
| 502 | |
| 503 | require.Len(t, diff.NewTools, 3, "Should have 3 new tools") |
| 504 | assert.Equal(t, "a-server", diff.NewTools[0].ServerName, "First tool should be a-server (sorted)") |
| 505 | assert.Equal(t, "m-server", diff.NewTools[1].ServerName, "Second tool should be m-server (sorted)") |
| 506 | assert.Equal(t, "z-server", diff.NewTools[2].ServerName, "Third tool should be z-server (sorted)") |
| 507 | } |
| 508 | |
| 509 | func TestComputeRunMetricsDiff_WithData(t *testing.T) { |
| 510 | summary1 := &RunSummary{ |
nothing calls this directly
no test coverage detected