(t *testing.T)
| 125 | } |
| 126 | |
| 127 | func TestRemoteLsFiltering(t *testing.T) { |
| 128 | t.Parallel() |
| 129 | repo := createTestRepo(t) |
| 130 | defer cleanupTestRepo(t, repo) |
| 131 | |
| 132 | remote, err := repo.Remotes.Create("origin", "https://github.com/libgit2/TestGitRepository") |
| 133 | checkFatal(t, err) |
| 134 | defer remote.Free() |
| 135 | |
| 136 | err = remote.ConnectFetch(nil, nil, nil) |
| 137 | checkFatal(t, err) |
| 138 | |
| 139 | heads, err := remote.Ls("master") |
| 140 | checkFatal(t, err) |
| 141 | |
| 142 | if len(heads) != 1 { |
| 143 | t.Fatalf("Expected one head for master but I got %d", len(heads)) |
| 144 | } |
| 145 | |
| 146 | if heads[0].Id == nil { |
| 147 | t.Fatalf("Expected head to have an Id, but it's nil") |
| 148 | } |
| 149 | |
| 150 | if heads[0].Name == "" { |
| 151 | t.Fatalf("Expected head to have a name, but it's empty") |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | func TestRemotePruneRefs(t *testing.T) { |
| 156 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…