(t *testing.T)
| 327 | } |
| 328 | |
| 329 | func TestRenderJSON(t *testing.T) { |
| 330 | // Create test audit data |
| 331 | auditData := AuditData{ |
| 332 | Overview: OverviewData{ |
| 333 | RunID: 123456, |
| 334 | WorkflowName: "Test Workflow", |
| 335 | Status: "completed", |
| 336 | Conclusion: "success", |
| 337 | Event: "push", |
| 338 | Branch: "main", |
| 339 | URL: "https://github.com/org/repo/actions/runs/123456", |
| 340 | }, |
| 341 | Metrics: MetricsData{ |
| 342 | TokenUsage: 1500, |
| 343 | Turns: 5, |
| 344 | ErrorCount: 1, |
| 345 | WarningCount: 1, |
| 346 | }, |
| 347 | Jobs: []JobData{ |
| 348 | { |
| 349 | Name: "test-job", |
| 350 | Status: "completed", |
| 351 | Conclusion: "success", |
| 352 | Duration: "2m30s", |
| 353 | }, |
| 354 | }, |
| 355 | DownloadedFiles: []FileInfo{ |
| 356 | { |
| 357 | Path: "aw_info.json", |
| 358 | Size: 1024, |
| 359 | Description: "Engine configuration and workflow metadata", |
| 360 | }, |
| 361 | }, |
| 362 | MissingTools: []MissingToolReport{ |
| 363 | { |
| 364 | Tool: "missing_tool", |
| 365 | Reason: "Tool not available", |
| 366 | }, |
| 367 | }, |
| 368 | Errors: []ErrorInfo{ |
| 369 | { |
| 370 | File: "agent.log", |
| 371 | Line: 42, |
| 372 | Type: "error", |
| 373 | Message: "Test error", |
| 374 | }, |
| 375 | }, |
| 376 | Warnings: []ErrorInfo{ |
| 377 | { |
| 378 | File: "agent.log", |
| 379 | Line: 50, |
| 380 | Type: "warning", |
| 381 | Message: "Test warning", |
| 382 | }, |
| 383 | }, |
| 384 | } |
| 385 | |
| 386 | // Render to JSON |
nothing calls this directly
no test coverage detected