(t *testing.T)
| 243 | } |
| 244 | |
| 245 | func TestDevRestore_DifferentHashMisses(t *testing.T) { |
| 246 | cache := newTestDevArtifactCache(t) |
| 247 | pkgDir := makePackageDir(t, "eigen@3.4.0") |
| 248 | |
| 249 | if err := cache.Store(pkgDir, "meta-content"); err != nil { |
| 250 | t.Fatal(err) |
| 251 | } |
| 252 | |
| 253 | // Restore with a wrong hash → miss. |
| 254 | destDir := filepath.Join(t.TempDir(), "dest") |
| 255 | fromPath, err := cache.Restore("eigen@3.4.0", "wrong-hash", destDir) |
| 256 | if err != nil { |
| 257 | t.Fatalf("unexpected error: %v", err) |
| 258 | } |
| 259 | if fromPath != "" { |
| 260 | t.Error("expected miss for wrong hash") |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | func TestDevRestore_OverwritesExistingPackageDir(t *testing.T) { |
| 265 | cache := newTestDevArtifactCache(t) |
nothing calls this directly
no test coverage detected