Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/gogs/gogs
/ SetMockAuth
Function
SetMockAuth
internal/conf/mocks.go:16–22 ·
view source on GitHub ↗
(t *testing.T, otps AuthOpts)
Source
from the content-addressed store, hash-verified
14
}
15
16
func
SetMockAuth(t *testing.T, otps AuthOpts) {
17
before := Auth
18
Auth = otps
19
t.Cleanup(
func
() {
20
Auth = before
21
})
22
}
23
24
var
mockServer sync.Mutex
25
Callers
1
TestGenerateActivateCode
Function · 0.92
Calls
no outgoing calls
Tested by
1
TestGenerateActivateCode
Function · 0.74