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

Function TestUserPath

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

Source from the content-addressed store, hash-verified

89}
90
91func TestUserPath(t *testing.T) {
92 if runtime.GOOS == "windows" {
93 t.Skip("Skipping testing on Windows")
94 return
95 }
96
97 conf.SetMockRepository(t,
98 conf.RepositoryOpts{
99 Root: "/home/git/gogs-repositories",
100 },
101 )
102
103 got := UserPath("alice")
104 want := "/home/git/gogs-repositories/alice"
105 assert.Equal(t, want, got)
106}
107
108func TestRepositoryPath(t *testing.T) {
109 if runtime.GOOS == "windows" {

Callers

nothing calls this directly

Calls 2

SetMockRepositoryFunction · 0.92
UserPathFunction · 0.85

Tested by

no test coverage detected