Home / Function/ TestConfigDefaultWithCustomConfig() — fiber Function Reference

TestConfigDefaultWithCustomConfig() — fiber Function Reference

Architecture documentation for the TestConfigDefaultWithCustomConfig() function in config_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  20943cea_822d_bf71_194d_d0cd6dd73363["TestConfigDefaultWithCustomConfig()"]
  c6f3fc00_d96e_8233_41a8_54350338f72c["config_test.go"]
  20943cea_822d_bf71_194d_d0cd6dd73363 -->|defined in| c6f3fc00_d96e_8233_41a8_54350338f72c
  style 20943cea_822d_bf71_194d_d0cd6dd73363 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/session/config_test.go lines 23–35

func TestConfigDefaultWithCustomConfig(t *testing.T) {
	// Test custom config
	customConfig := Config{
		IdleTimeout:  48 * time.Hour,
		Extractor:    extractors.FromHeader("X-Custom-Session"),
		KeyGenerator: func() string { return "custom_key" },
	}
	cfg := configDefault(customConfig)
	require.Equal(t, 48*time.Hour, cfg.IdleTimeout)
	require.NotNil(t, cfg.KeyGenerator)
	require.NotNil(t, cfg.Extractor)
	require.Equal(t, "X-Custom-Session", cfg.Extractor.Key)
}

Subdomains

Frequently Asked Questions

What does TestConfigDefaultWithCustomConfig() do?
TestConfigDefaultWithCustomConfig() is a function in the fiber codebase, defined in middleware/session/config_test.go.
Where is TestConfigDefaultWithCustomConfig() defined?
TestConfigDefaultWithCustomConfig() is defined in middleware/session/config_test.go at line 23.

Analyze Your Own Codebase

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

Try Supermodel Free