Home / Function/ executeExpectations() — fiber Function Reference

executeExpectations() — fiber Function Reference

Architecture documentation for the executeExpectations() function in earlydata_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  d055c651_518b_e138_97aa_b59d12e0a63f["executeExpectations()"]
  89ff38ec_40bf_204e_af8c_37d168e2a1f9["earlydata_test.go"]
  d055c651_518b_e138_97aa_b59d12e0a63f -->|defined in| 89ff38ec_40bf_204e_af8c_37d168e2a1f9
  22cab21c_8426_7b52_02c4_68f2b7486d46["Test_EarlyData()"]
  22cab21c_8426_7b52_02c4_68f2b7486d46 -->|calls| d055c651_518b_e138_97aa_b59d12e0a63f
  style d055c651_518b_e138_97aa_b59d12e0a63f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/earlydata/earlydata_test.go lines 95–109

func executeExpectations(t *testing.T, app *fiber.App, remoteAddr string, expectations []requestExpectation) {
	t.Helper()

	for _, expectation := range expectations {
		req := httptest.NewRequest(expectation.method, "/", http.NoBody)
		req.RemoteAddr = remoteAddr
		if expectation.header != "" {
			req.Header.Set(headerName, expectation.header)
		}

		resp, err := app.Test(req)
		require.NoError(t, err)
		require.Equal(t, expectation.status, resp.StatusCode)
	}
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does executeExpectations() do?
executeExpectations() is a function in the fiber codebase, defined in middleware/earlydata/earlydata_test.go.
Where is executeExpectations() defined?
executeExpectations() is defined in middleware/earlydata/earlydata_test.go at line 95.
What calls executeExpectations()?
executeExpectations() is called by 1 function(s): Test_EarlyData.

Analyze Your Own Codebase

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

Try Supermodel Free