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

Function TestStore_WritableFalse

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

Source from the content-addressed store, hash-verified

246}
247
248func TestStore_WritableFalse(t *testing.T) {
249 tmpDir, pkgCacheDir, _ := setupTestEnv(t)
250 rc := newRepoConfig(pkgCacheDir, false)
251
252 archivePath, _ := createArchiveFlat(t, tmpDir, "hello.txt", "hello")
253 repoDir := filepath.Join(tmpDir, "buildtrees", "x264@stable", "src")
254
255 stored, err := rc.Store("x264@stable", "https://example.com/lib.tar.gz", repoDir, archivePath)
256 if err != nil {
257 t.Fatal(err)
258 }
259 if stored != "" {
260 t.Fatalf("expected empty path when not writable, got %s", stored)
261 }
262}
263
264func TestStore_GitRepo(t *testing.T) {
265 tmpDir, pkgCacheDir, _ := setupTestEnv(t)

Callers

nothing calls this directly

Calls 4

setupTestEnvFunction · 0.85
newRepoConfigFunction · 0.85
createArchiveFlatFunction · 0.85
StoreMethod · 0.65

Tested by

no test coverage detected