TestToFiberHandler_HTTPHandler() — fiber Function Reference
Architecture documentation for the TestToFiberHandler_HTTPHandler() function in adapter_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 8e5481b3_8276_6dce_aeb9_8b527ad8030e["TestToFiberHandler_HTTPHandler()"] 3ad7a4ef_7f07_008c_234d_52c9a342aa98["adapter_test.go"] 8e5481b3_8276_6dce_aeb9_8b527ad8030e -->|defined in| 3ad7a4ef_7f07_008c_234d_52c9a342aa98 style 8e5481b3_8276_6dce_aeb9_8b527ad8030e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
adapter_test.go lines 621–645
func TestToFiberHandler_HTTPHandler(t *testing.T) {
t.Parallel()
var writeErr error
var handler http.Handler = http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("X-HTTP", "handler")
_, writeErr = w.Write([]byte("through"))
})
converted, ok := toFiberHandler(handler)
require.True(t, ok)
require.NotNil(t, converted)
app := New()
ctx := app.AcquireCtx(&fasthttp.RequestCtx{})
t.Cleanup(func() {
app.ReleaseCtx(ctx)
})
err := converted(ctx)
require.NoError(t, err)
require.Equal(t, "handler", string(ctx.Response().Header.Peek("X-HTTP")))
require.Equal(t, "through", string(ctx.Response().Body()))
require.NoError(t, writeErr)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does TestToFiberHandler_HTTPHandler() do?
TestToFiberHandler_HTTPHandler() is a function in the fiber codebase, defined in adapter_test.go.
Where is TestToFiberHandler_HTTPHandler() defined?
TestToFiberHandler_HTTPHandler() is defined in adapter_test.go at line 621.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free