(t *testing.T)
| 262 | } |
| 263 | |
| 264 | func TestStore_GitRepo(t *testing.T) { |
| 265 | tmpDir, pkgCacheDir, _ := setupTestEnv(t) |
| 266 | rc := newRepoConfig(pkgCacheDir, true) |
| 267 | |
| 268 | repoDir, commitHash := createGitRepo(t, tmpDir) |
| 269 | repoURL := "https://example.com/lib.git" |
| 270 | |
| 271 | stored, err := rc.Store("x264@stable", repoURL, repoDir, "") |
| 272 | if err != nil { |
| 273 | t.Fatal(err) |
| 274 | } |
| 275 | |
| 276 | expected := filepath.Join(pkgCacheDir, "repos", "x264@stable", commitHash+".tar.gz") |
| 277 | if stored != expected { |
| 278 | t.Fatalf("expected stored path %s, got %s", expected, stored) |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | // ---- Restore tests ---- |
| 283 |
nothing calls this directly
no test coverage detected