(t *testing.T)
| 205 | } |
| 206 | |
| 207 | func TestActionCacheEmptySaveDoesNotCreateFile(t *testing.T) { |
| 208 | // Create temporary directory for testing |
| 209 | tmpDir := testutil.TempDir(t, "test-*") |
| 210 | |
| 211 | // Create empty cache |
| 212 | cache := NewActionCache(tmpDir) |
| 213 | |
| 214 | // Save empty cache |
| 215 | err := cache.Save() |
| 216 | if err != nil { |
| 217 | t.Fatalf("Failed to save empty cache: %v", err) |
| 218 | } |
| 219 | |
| 220 | // Verify file does NOT exist |
| 221 | cachePath := filepath.Join(tmpDir, ".github", "aw", CacheFileName) |
| 222 | if _, err := os.Stat(cachePath); !os.IsNotExist(err) { |
| 223 | t.Error("Empty cache should not create a file") |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | func TestActionCacheEmptySaveDeletesExistingFile(t *testing.T) { |
| 228 | // Create temporary directory for testing |
nothing calls this directly
no test coverage detected