MCPcopy Create free account
hub / github.com/rilldata/rill / TestPartiallyNull

Function TestPartiallyNull

admin/pkg/authtoken/authtoken_test.go:75–92  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

73}
74
75func TestPartiallyNull(t *testing.T) {
76 secret := [24]byte{}
77 secret[23] = 0x01
78
79 tkn := Token{
80 Type: TypeUser,
81 ID: uuid.MustParse("00000000-0000-0000-0000-000000000001"),
82 Secret: secret,
83 }
84
85 str := tkn.String()
86
87 parsed, err := FromString(str)
88 require.NoError(t, err)
89 require.Equal(t, tkn.Type, parsed.Type)
90 require.Equal(t, tkn.ID, parsed.ID)
91 require.Equal(t, tkn.Secret, parsed.Secret)
92}
93
94func TestMany(t *testing.T) {
95 for i := 0; i < 100000; i++ {

Callers

nothing calls this directly

Calls 2

StringMethod · 0.95
FromStringFunction · 0.85

Tested by

no test coverage detected