(t *testing.T)
| 246 | } |
| 247 | |
| 248 | func 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 | |
| 264 | func TestStore_GitRepo(t *testing.T) { |
| 265 | tmpDir, pkgCacheDir, _ := setupTestEnv(t) |
nothing calls this directly
no test coverage detected