MCPcopy Create free account
hub / github.com/celer-pkg/celer / TestRestore_CacheNotExists

Function TestRestore_CacheNotExists

pkgcache/cache_repo_test.go:390–401  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

388}
389
390func TestRestore_CacheNotExists(t *testing.T) {
391 _, pkgCacheDir, _ := setupTestEnv(t)
392 rc := newRepoConfig(pkgCacheDir, true)
393
394 restored, err := rc.Restore("x264@stable", "https://example.com/lib.tar.gz", "/tmp/unused", "abc123")
395 if err != nil {
396 t.Fatal(err)
397 }
398 if restored != "" {
399 t.Fatalf("expected empty path when cache missing, got %s", restored)
400 }
401}
402
403func TestRestore_EmptyChecksum(t *testing.T) {
404 _, pkgCacheDir, _ := setupTestEnv(t)

Callers

nothing calls this directly

Calls 3

setupTestEnvFunction · 0.85
newRepoConfigFunction · 0.85
RestoreMethod · 0.65

Tested by

no test coverage detected