(t *testing.T)
| 63 | } |
| 64 | |
| 65 | func TestGoGitRepo_Indexes(t *testing.T) { |
| 66 | repo := CreateGoGitTestRepo(t, false) |
| 67 | plainRoot := goGitRepoDir(t, repo) |
| 68 | |
| 69 | // Can create indices |
| 70 | indexA, err := repo.GetIndex("a") |
| 71 | require.NoError(t, err) |
| 72 | require.NotZero(t, indexA) |
| 73 | require.FileExists(t, filepath.Join(plainRoot, ".git", namespace, "indexes", "a", "index_meta.json")) |
| 74 | require.FileExists(t, filepath.Join(plainRoot, ".git", namespace, "indexes", "a", "store")) |
| 75 | |
| 76 | indexB, err := repo.GetIndex("b") |
| 77 | require.NoError(t, err) |
| 78 | require.NotZero(t, indexB) |
| 79 | require.DirExists(t, filepath.Join(plainRoot, ".git", namespace, "indexes", "b")) |
| 80 | |
| 81 | // Can get an existing index |
| 82 | indexA, err = repo.GetIndex("a") |
| 83 | require.NoError(t, err) |
| 84 | require.NotZero(t, indexA) |
| 85 | } |
| 86 | |
| 87 | func TestGoGit_DetectsSubmodules(t *testing.T) { |
| 88 | repo := CreateGoGitTestRepo(t, false) |
nothing calls this directly
no test coverage detected