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

Function TestNull

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

Source from the content-addressed store, hash-verified

57}
58
59func TestNull(t *testing.T) {
60 tkn := Token{
61 Type: TypeUser,
62 ID: uuid.UUID{},
63 Secret: [24]byte{},
64 }
65
66 str := tkn.String()
67
68 parsed, err := FromString(str)
69 require.NoError(t, err)
70 require.Equal(t, tkn.Type, parsed.Type)
71 require.Equal(t, tkn.ID, parsed.ID)
72 require.Equal(t, tkn.Secret, parsed.Secret)
73}
74
75func TestPartiallyNull(t *testing.T) {
76 secret := [24]byte{}

Callers

nothing calls this directly

Calls 2

StringMethod · 0.95
FromStringFunction · 0.85

Tested by

no test coverage detected