MCPcopy
hub / github.com/gotify/server / TestTokenHavePrefix

Function TestTokenHavePrefix

auth/token_test.go:13–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11)
12
13func TestTokenHavePrefix(t *testing.T) {
14 for i := 0; i < 50; i++ {
15 assert.True(t, strings.HasPrefix(GenerateApplicationToken(), "A"))
16 assert.True(t, strings.HasPrefix(GenerateClientToken(), "C"))
17 assert.True(t, strings.HasPrefix(GeneratePluginToken(), "P"))
18 assert.NotEmpty(t, GenerateImageName())
19 }
20}
21
22func TestGenerateNotExistingToken(t *testing.T) {
23 count := 5

Callers

nothing calls this directly

Calls 4

GenerateApplicationTokenFunction · 0.85
GenerateClientTokenFunction · 0.85
GeneratePluginTokenFunction · 0.85
GenerateImageNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…