(t *testing.T)
| 12 | ) |
| 13 | |
| 14 | func TestParseAgentLogNoAgentOutput(t *testing.T) { |
| 15 | // Create a temporary directory without agent logs |
| 16 | tempDir := testutil.TempDir(t, "test-*") |
| 17 | |
| 18 | // Get the Claude engine |
| 19 | registry := workflow.GetGlobalEngineRegistry() |
| 20 | engine, err := registry.GetEngine("claude") |
| 21 | if err != nil { |
| 22 | t.Fatalf("Failed to get Claude engine: %v", err) |
| 23 | } |
| 24 | |
| 25 | // Run the parser - should not fail, just skip |
| 26 | err = parseAgentLog(tempDir, engine, true) |
| 27 | if err != nil { |
| 28 | t.Fatalf("parseAgentLog should not fail when agent logs are missing: %v", err) |
| 29 | } |
| 30 | |
| 31 | // Check that log.md was NOT created |
| 32 | logMdPath := filepath.Join(tempDir, "log.md") |
| 33 | if _, err := os.Stat(logMdPath); !os.IsNotExist(err) { |
| 34 | t.Fatalf("log.md should not be created when agent logs are missing") |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | func TestParseAgentLogNoEngine(t *testing.T) { |
| 39 | // Create a temporary directory with agent-stdio.log |
nothing calls this directly
no test coverage detected