MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / TestCookies

Function TestCookies

pkg/web/web_test.go:86–98  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

84}
85
86func TestCookies(t *testing.T) {
87 a := assertions.New(t)
88 // Errors on illegal hash key byte size
89 {
90 _, err := New(test.Context(), WithCookieKeys(random.Bytes(2), nil))
91 a.So(err, should.NotBeNil)
92 }
93 // Errors on non 32bit block key
94 {
95 _, err := New(test.Context(), WithCookieKeys(nil, random.Bytes(31)))
96 a.So(err, should.NotBeNil)
97 }
98}

Callers

nothing calls this directly

Calls 5

ContextFunction · 0.92
BytesFunction · 0.92
WithCookieKeysFunction · 0.85
NewFunction · 0.70
NewMethod · 0.65

Tested by

no test coverage detected