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

Function TestRemoteConnectOption

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

Source from the content-addressed store, hash-verified

82}
83
84func TestRemoteConnectOption(t *testing.T) {
85 t.Parallel()
86 repo := createTestRepo(t)
87 defer cleanupTestRepo(t, repo)
88
89 config, err := repo.Config()
90 checkFatal(t, err)
91 err = config.SetString("url.git@github.com:.insteadof", "https://github.com/")
92 checkFatal(t, err)
93
94 option, err := DefaultRemoteCreateOptions()
95 checkFatal(t, err)
96 option.Name = "origin"
97 option.Flags = RemoteCreateSkipInsteadof
98
99 remote, err := repo.Remotes.CreateWithOptions("https://github.com/libgit2/TestGitRepository", option)
100 checkFatal(t, err)
101 defer remote.Free()
102
103 err = remote.ConnectFetch(nil, nil, nil)
104 checkFatal(t, err)
105}
106
107func TestRemoteLs(t *testing.T) {
108 t.Parallel()

Callers

nothing calls this directly

Calls 9

createTestRepoFunction · 0.85
cleanupTestRepoFunction · 0.85
checkFatalFunction · 0.85
ConfigMethod · 0.80
SetStringMethod · 0.80
CreateWithOptionsMethod · 0.80
ConnectFetchMethod · 0.80
FreeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…