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

Function TestListRemotes

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

Source from the content-addressed store, hash-verified

20)
21
22func TestListRemotes(t *testing.T) {
23 t.Parallel()
24 repo := createTestRepo(t)
25 defer cleanupTestRepo(t, repo)
26
27 remote, err := repo.Remotes.Create("test", "git://foo/bar")
28 checkFatal(t, err)
29 defer remote.Free()
30
31 expected := []string{
32 "test",
33 }
34
35 actual, err := repo.Remotes.List()
36 checkFatal(t, err)
37
38 compareStringList(t, expected, actual)
39}
40
41func assertHostname(cert *Certificate, valid bool, hostname string, t *testing.T) error {
42 if hostname != "github.com" {

Callers

nothing calls this directly

Calls 7

createTestRepoFunction · 0.85
cleanupTestRepoFunction · 0.85
checkFatalFunction · 0.85
compareStringListFunction · 0.85
FreeMethod · 0.65
CreateMethod · 0.45
ListMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…