(t *testing.T)
| 159 | } |
| 160 | |
| 161 | func TestLoadRunSummaryMissingFile(t *testing.T) { |
| 162 | // Create a temporary directory for testing |
| 163 | tmpDir := testutil.TempDir(t, "test-*") |
| 164 | runDir := filepath.Join(tmpDir, "run-12345") |
| 165 | if err := os.MkdirAll(runDir, 0755); err != nil { |
| 166 | t.Fatalf("Failed to create test directory: %v", err) |
| 167 | } |
| 168 | |
| 169 | // Try to load from directory with no summary file |
| 170 | loadedSummary, ok := loadRunSummary(runDir, false) |
| 171 | if ok { |
| 172 | t.Fatal("Expected loadRunSummary to return false for missing file, but it returned true") |
| 173 | } |
| 174 | if loadedSummary != nil { |
| 175 | t.Errorf("Expected nil summary for missing file, but got: %+v", loadedSummary) |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | func TestLoadRunSummaryInvalidJSON(t *testing.T) { |
| 180 | // Create a temporary directory for testing |
nothing calls this directly
no test coverage detected