MCPcopy Index your code
hub / github.com/celer-pkg/celer / TestDevRestore_CacheMiss

Function TestDevRestore_CacheMiss

pkgcache/cache_dev_artifact_test.go:206–217  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

204}
205
206func TestDevRestore_CacheMiss(t *testing.T) {
207 cache := newTestDevArtifactCache(t)
208 destDir := filepath.Join(t.TempDir(), "dest")
209
210 fromPath, err := cache.Restore("nonexistent@1.0", "somehash", destDir)
211 if err != nil {
212 t.Fatalf("unexpected error on cache miss: %v", err)
213 }
214 if fromPath != "" {
215 t.Errorf("expected empty path on cache miss, got %s", fromPath)
216 }
217}
218
219func TestDevRestore_TamperedMetaFails(t *testing.T) {
220 cache := newTestDevArtifactCache(t)

Callers

nothing calls this directly

Calls 2

newTestDevArtifactCacheFunction · 0.85
RestoreMethod · 0.65

Tested by

no test coverage detected