Home / Function/ Test_Listen_Master_Process_Show_Startup_MessageWithDisabledPreforkAndCustomEndpoint() — fiber Function Reference

Test_Listen_Master_Process_Show_Startup_MessageWithDisabledPreforkAndCustomEndpoint() — fiber Function Reference

Architecture documentation for the Test_Listen_Master_Process_Show_Startup_MessageWithDisabledPreforkAndCustomEndpoint() function in listen_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  f2f90094_e2d1_9a16_775d_2a6a61d09e1b["Test_Listen_Master_Process_Show_Startup_MessageWithDisabledPreforkAndCustomEndpoint()"]
  edd60c6a_f37d_c392_5301_d2d5a002990a["listen_test.go"]
  f2f90094_e2d1_9a16_775d_2a6a61d09e1b -->|defined in| edd60c6a_f37d_c392_5301_d2d5a002990a
  e606935d_5140_5f32_e530_9b041f7f3116["captureOutput()"]
  f2f90094_e2d1_9a16_775d_2a6a61d09e1b -->|calls| e606935d_5140_5f32_e530_9b041f7f3116
  style f2f90094_e2d1_9a16_775d_2a6a61d09e1b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

listen_test.go lines 718–743

func Test_Listen_Master_Process_Show_Startup_MessageWithDisabledPreforkAndCustomEndpoint(t *testing.T) {
	cfg := ListenConfig{
		EnablePrefork: false,
	}

	appName := "Fiber Example Application"
	app := New(Config{AppName: appName})
	ln, err := net.Listen(NetworkTCP4, "127.0.0.1:0")
	require.NoError(t, err)
	addr, ok := ln.Addr().(*net.TCPAddr)
	require.True(t, ok)
	port := addr.Port
	require.NoError(t, ln.Close())

	listenData := app.prepareListenData(fmt.Sprintf("server.com:%d", port), true, &cfg, nil)

	startupMessage := captureOutput(func() {
		app.startupMessage(listenData, &cfg)
	})
	colors := Colors{}
	require.Contains(t, startupMessage, fmt.Sprintf("%sINFO%s", colors.Green, colors.Reset))
	require.Contains(t, startupMessage, fmt.Sprintf("%s%s%s", colors.Blue, appName, colors.Reset))
	expectedURL := fmt.Sprintf("https://server.com:%d", port)
	require.Contains(t, startupMessage, fmt.Sprintf("%s%s%s", colors.Blue, expectedURL, colors.Reset))
	require.Contains(t, startupMessage, fmt.Sprintf("Prefork: \t\t\t%sDisabled%s", colors.Red, colors.Reset))
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does Test_Listen_Master_Process_Show_Startup_MessageWithDisabledPreforkAndCustomEndpoint() do?
Test_Listen_Master_Process_Show_Startup_MessageWithDisabledPreforkAndCustomEndpoint() is a function in the fiber codebase, defined in listen_test.go.
Where is Test_Listen_Master_Process_Show_Startup_MessageWithDisabledPreforkAndCustomEndpoint() defined?
Test_Listen_Master_Process_Show_Startup_MessageWithDisabledPreforkAndCustomEndpoint() is defined in listen_test.go at line 718.
What does Test_Listen_Master_Process_Show_Startup_MessageWithDisabledPreforkAndCustomEndpoint() call?
Test_Listen_Master_Process_Show_Startup_MessageWithDisabledPreforkAndCustomEndpoint() calls 1 function(s): captureOutput.

Analyze Your Own Codebase

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

Try Supermodel Free