MCPcopy Create free account
hub / github.com/gogs/gogs / TestRepositoryPath

Function TestRepositoryPath

internal/repoutil/repoutil_test.go:108–123  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

106}
107
108func TestRepositoryPath(t *testing.T) {
109 if runtime.GOOS == "windows" {
110 t.Skip("Skipping testing on Windows")
111 return
112 }
113
114 conf.SetMockRepository(t,
115 conf.RepositoryOpts{
116 Root: "/home/git/gogs-repositories",
117 },
118 )
119
120 got := RepositoryPath("alice", "example")
121 want := "/home/git/gogs-repositories/alice/example.git"
122 assert.Equal(t, want, got)
123}
124
125func TestRepositoryLocalPath(t *testing.T) {
126 if runtime.GOOS == "windows" {

Callers

nothing calls this directly

Calls 2

SetMockRepositoryFunction · 0.92
RepositoryPathFunction · 0.85

Tested by

no test coverage detected