Test_App_AutoHead_Compliance() — fiber Function Reference
Architecture documentation for the Test_App_AutoHead_Compliance() function in app_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD ec2d615e_2ed8_5477_8ab4_74b80edc1edb["Test_App_AutoHead_Compliance()"] e728fdd2_242f_706b_c1d2_041b3d6badb5["app_test.go"] ec2d615e_2ed8_5477_8ab4_74b80edc1edb -->|defined in| e728fdd2_242f_706b_c1d2_041b3d6badb5 style ec2d615e_2ed8_5477_8ab4_74b80edc1edb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
app_test.go lines 1120–1157
func Test_App_AutoHead_Compliance(t *testing.T) {
t.Parallel()
app := New()
app.Get("/hello", func(c Ctx) error {
c.Set("X-Test", "string")
return c.SendString("hello")
})
app.startupProcess()
getReq := httptest.NewRequest(MethodGet, "/hello", http.NoBody)
getResp, err := app.Test(getReq)
require.NoError(t, err, "app.Test(get)")
defer func() {
require.NoError(t, getResp.Body.Close())
}()
body, err := io.ReadAll(getResp.Body)
require.NoError(t, err)
require.Equal(t, "hello", string(body))
require.Equal(t, "string", getResp.Header.Get("X-Test"))
headReq := httptest.NewRequest(MethodHead, "/hello", http.NoBody)
headResp, err := app.Test(headReq)
require.NoError(t, err, "app.Test(head)")
defer func() {
require.NoError(t, headResp.Body.Close())
}()
require.Equal(t, getResp.StatusCode, headResp.StatusCode)
require.Equal(t, strconv.Itoa(len(body)), headResp.Header.Get(HeaderContentLength))
require.Equal(t, getResp.Header.Get(HeaderContentType), headResp.Header.Get(HeaderContentType))
require.Equal(t, getResp.Header.Get("X-Test"), headResp.Header.Get("X-Test"))
headBody, err := io.ReadAll(headResp.Body)
require.NoError(t, err)
require.Empty(t, headBody)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Test_App_AutoHead_Compliance() do?
Test_App_AutoHead_Compliance() is a function in the fiber codebase, defined in app_test.go.
Where is Test_App_AutoHead_Compliance() defined?
Test_App_AutoHead_Compliance() is defined in app_test.go at line 1120.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free