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

Function SetMockServer

internal/conf/mocks.go:26–34  ·  view source on GitHub ↗
(t *testing.T, opts ServerOpts)

Source from the content-addressed store, hash-verified

24var mockServer sync.Mutex
25
26func SetMockServer(t *testing.T, opts ServerOpts) {
27 mockServer.Lock()
28 before := Server
29 Server = opts
30 t.Cleanup(func() {
31 Server = before
32 mockServer.Unlock()
33 })
34}
35
36var mockSSH sync.Mutex
37

Callers 7

actionsPushTagFunction · 0.92
usersChangeUsernameFunction · 0.92
TestNewCloneLinkFunction · 0.92
TestHTMLURLFunction · 0.92
TestRepositoryLocalPathFunction · 0.92
TestServeBatchFunction · 0.92

Calls

no outgoing calls

Tested by 7

actionsPushTagFunction · 0.74
usersChangeUsernameFunction · 0.74
TestNewCloneLinkFunction · 0.74
TestHTMLURLFunction · 0.74
TestRepositoryLocalPathFunction · 0.74
TestServeBatchFunction · 0.74