Home / Function/ Test_Integration_App_ServerErrorHandler_GroupMiddlewareChain() — fiber Function Reference

Test_Integration_App_ServerErrorHandler_GroupMiddlewareChain() — fiber Function Reference

Architecture documentation for the Test_Integration_App_ServerErrorHandler_GroupMiddlewareChain() function in app_integration_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  d02d3d15_42f7_afd8_392a_8cc04d2c753f["Test_Integration_App_ServerErrorHandler_GroupMiddlewareChain()"]
  861529d8_c77d_779c_a04e_384693fbcc82["app_integration_test.go"]
  d02d3d15_42f7_afd8_392a_8cc04d2c753f -->|defined in| 861529d8_c77d_779c_a04e_384693fbcc82
  89ef89e1_149f_b4b2_0c6a_e8967b8441b2["performOversizedRequest()"]
  d02d3d15_42f7_afd8_392a_8cc04d2c753f -->|calls| 89ef89e1_149f_b4b2_0c6a_e8967b8441b2
  style d02d3d15_42f7_afd8_392a_8cc04d2c753f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

app_integration_test.go lines 557–579

func Test_Integration_App_ServerErrorHandler_GroupMiddlewareChain(t *testing.T) {
	app := fiber.New(fiber.Config{BodyLimit: 16})
	app.Use(helmet.New())

	api := app.Group("/api")
	api.Use(requestid.New())
	api.Use(func(c fiber.Ctx) error {
		c.Set("X-Group-Middleware", "active")
		return c.Next()
	})
	api.Post("/resource", func(c fiber.Ctx) error {
		return c.SendStatus(fiber.StatusOK)
	})

	resp := performOversizedRequest(t, app, func(req *fasthttp.Request) {
		req.SetRequestURI("http://example.com/api/resource")
	})

	require.Equal(t, fiber.StatusRequestEntityTooLarge, resp.StatusCode())
	require.Equal(t, "nosniff", string(resp.Header.Peek(fiber.HeaderXContentTypeOptions)))
	require.NotEmpty(t, resp.Header.Peek("X-Request-ID"))
	require.Equal(t, "active", string(resp.Header.Peek("X-Group-Middleware")))
}

Domain

Subdomains

Frequently Asked Questions

What does Test_Integration_App_ServerErrorHandler_GroupMiddlewareChain() do?
Test_Integration_App_ServerErrorHandler_GroupMiddlewareChain() is a function in the fiber codebase, defined in app_integration_test.go.
Where is Test_Integration_App_ServerErrorHandler_GroupMiddlewareChain() defined?
Test_Integration_App_ServerErrorHandler_GroupMiddlewareChain() is defined in app_integration_test.go at line 557.
What does Test_Integration_App_ServerErrorHandler_GroupMiddlewareChain() call?
Test_Integration_App_ServerErrorHandler_GroupMiddlewareChain() calls 1 function(s): performOversizedRequest.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free