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

Function TestStore_ArchiveSkipsWhenFileNotExists

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

Source from the content-addressed store, hash-verified

230}
231
232func TestStore_ArchiveSkipsWhenFileNotExists(t *testing.T) {
233 _, pkgCacheDir, _ := setupTestEnv(t)
234 rc := newRepoConfig(pkgCacheDir, true)
235
236 repoDir := "/nonexistent/src"
237 archiveFile := "/nonexistent/archive.tar.gz"
238
239 stored, err := rc.Store("x264@stable", "https://example.com/lib.tar.gz", repoDir, archiveFile)
240 if err != nil {
241 t.Fatal(err)
242 }
243 if stored != "" {
244 t.Fatalf("expected empty path when archiveFile missing, got %s", stored)
245 }
246}
247
248func TestStore_WritableFalse(t *testing.T) {
249 tmpDir, pkgCacheDir, _ := setupTestEnv(t)

Callers

nothing calls this directly

Calls 3

setupTestEnvFunction · 0.85
newRepoConfigFunction · 0.85
StoreMethod · 0.65

Tested by

no test coverage detected