MCPcopy Create free account
hub / github.com/libgit2/git2go / TestRemoteLs

Function TestRemoteLs

remote_test.go:107–125  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

105}
106
107func TestRemoteLs(t *testing.T) {
108 t.Parallel()
109 repo := createTestRepo(t)
110 defer cleanupTestRepo(t, repo)
111
112 remote, err := repo.Remotes.Create("origin", "https://github.com/libgit2/TestGitRepository")
113 checkFatal(t, err)
114 defer remote.Free()
115
116 err = remote.ConnectFetch(nil, nil, nil)
117 checkFatal(t, err)
118
119 heads, err := remote.Ls()
120 checkFatal(t, err)
121
122 if len(heads) == 0 {
123 t.Error("Expected remote heads")
124 }
125}
126
127func TestRemoteLsFiltering(t *testing.T) {
128 t.Parallel()

Callers

nothing calls this directly

Calls 8

createTestRepoFunction · 0.85
cleanupTestRepoFunction · 0.85
checkFatalFunction · 0.85
ConnectFetchMethod · 0.80
LsMethod · 0.80
ErrorMethod · 0.80
FreeMethod · 0.65
CreateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…