Home / Function/ Test_New_InvalidKey() — fiber Function Reference

Test_New_InvalidKey() — fiber Function Reference

Architecture documentation for the Test_New_InvalidKey() function in idempotency_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  c06bfd82_9d3d_d454_b45c_9ec718e569d4["Test_New_InvalidKey()"]
  94a179ed_b8df_d669_56a8_8e55d7bbb6bf["idempotency_test.go"]
  c06bfd82_9d3d_d454_b45c_9ec718e569d4 -->|defined in| 94a179ed_b8df_d669_56a8_8e55d7bbb6bf
  c0f669d8_cf91_791e_215a_b1f0725d315b["do()"]
  c06bfd82_9d3d_d454_b45c_9ec718e569d4 -->|calls| c0f669d8_cf91_791e_215a_b1f0725d315b
  style c06bfd82_9d3d_d454_b45c_9ec718e569d4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/idempotency/idempotency_test.go lines 263–275

func Test_New_InvalidKey(t *testing.T) {
	t.Parallel()
	app := fiber.New()
	app.Use(New())
	app.Post("/", func(_ fiber.Ctx) error { return nil })

	req := httptest.NewRequest(http.MethodPost, "/", http.NoBody)
	req.Header.Set(ConfigDefault.KeyHeader, "bad")
	resp, body := do(app, req)

	require.Equal(t, fiber.StatusInternalServerError, resp.StatusCode)
	require.Contains(t, body, "invalid length")
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does Test_New_InvalidKey() do?
Test_New_InvalidKey() is a function in the fiber codebase, defined in middleware/idempotency/idempotency_test.go.
Where is Test_New_InvalidKey() defined?
Test_New_InvalidKey() is defined in middleware/idempotency/idempotency_test.go at line 263.
What does Test_New_InvalidKey() call?
Test_New_InvalidKey() calls 1 function(s): do.

Analyze Your Own Codebase

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

Try Supermodel Free