MCPcopy Index your code
hub / github.com/git-bug/git-bug / SetupGoGitReposAndRemote

Function SetupGoGitReposAndRemote

repository/gogit_testing.go:56–74  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

54}
55
56func SetupGoGitReposAndRemote(t *testing.T) (repoA, repoB, remote TestedRepo) {
57 t.Helper()
58
59 repoA = CreateGoGitTestRepo(t, false)
60 repoB = CreateGoGitTestRepo(t, false)
61 remote = CreateGoGitTestRepo(t, true)
62
63 err := repoA.AddRemote("origin", remote.GetLocalRemote())
64 if err != nil {
65 log.Fatal(err)
66 }
67
68 err = repoB.AddRemote("origin", remote.GetLocalRemote())
69 if err != nil {
70 log.Fatal(err)
71 }
72
73 return repoA, repoB, remote
74}
75
76func goGitRepoDir(t *testing.T, repo TestedRepo) string {
77 t.Helper()

Callers 2

TestCachePushPullFunction · 0.92
TestIdentityPushPullFunction · 0.92

Calls 5

CreateGoGitTestRepoFunction · 0.85
HelperMethod · 0.80
FatalMethod · 0.80
AddRemoteMethod · 0.65
GetLocalRemoteMethod · 0.65

Tested by 2

TestCachePushPullFunction · 0.74
TestIdentityPushPullFunction · 0.74