MCPcopy
hub / github.com/gofiber/fiber / Test_App_SetTLSHandler

Function Test_App_SetTLSHandler

app_test.go:3085–3098  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3083}
3084
3085func Test_App_SetTLSHandler(t *testing.T) {
3086 t.Parallel()
3087 tlsHandler := &TLSHandler{clientHelloInfo: &tls.ClientHelloInfo{
3088 ServerName: "example.golang",
3089 }}
3090
3091 app := New()
3092 app.SetTLSHandler(tlsHandler)
3093
3094 c := app.AcquireCtx(&fasthttp.RequestCtx{})
3095 defer app.ReleaseCtx(c)
3096
3097 require.Equal(t, "example.golang", c.ClientHelloInfo().ServerName)
3098}
3099
3100func Test_App_AddCustomRequestMethod(t *testing.T) {
3101 t.Parallel()

Callers

nothing calls this directly

Calls 5

SetTLSHandlerMethod · 0.80
AcquireCtxMethod · 0.80
ReleaseCtxMethod · 0.80
NewFunction · 0.70
ClientHelloInfoMethod · 0.65

Tested by

no test coverage detected