Home / File/ app_integration_test.go — fiber Source File

app_integration_test.go — fiber Source File

Architecture documentation for app_integration_test.go, a go file in the fiber codebase. 1 imports, 0 dependents.

File go FiberCore Context 1 imports 13 functions 1 classes

Entity Profile

Dependency Diagram

graph LR
  861529d8_c77d_779c_a04e_384693fbcc82["app_integration_test.go"]
  c0b86961_3ef1_0168_52fc_98627566ed27["bytes"]
  861529d8_c77d_779c_a04e_384693fbcc82 --> c0b86961_3ef1_0168_52fc_98627566ed27
  style 861529d8_c77d_779c_a04e_384693fbcc82 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

package fiber_test

import (
	"bytes"
	"errors"
	"net"
	"strconv"
	"strings"
	"testing"
	"time"

	"github.com/stretchr/testify/require"

	"github.com/gofiber/fiber/v3"
	"github.com/gofiber/fiber/v3/middleware/basicauth"
	"github.com/gofiber/fiber/v3/middleware/cache"
	"github.com/gofiber/fiber/v3/middleware/compress"
	"github.com/gofiber/fiber/v3/middleware/cors"
	"github.com/gofiber/fiber/v3/middleware/csrf"
	"github.com/gofiber/fiber/v3/middleware/encryptcookie"
	"github.com/gofiber/fiber/v3/middleware/envvar"
	"github.com/gofiber/fiber/v3/middleware/helmet"
	"github.com/gofiber/fiber/v3/middleware/keyauth"
	"github.com/gofiber/fiber/v3/middleware/limiter"
	"github.com/gofiber/fiber/v3/middleware/recover"
	"github.com/gofiber/fiber/v3/middleware/requestid"
	"github.com/gofiber/fiber/v3/middleware/session"
	"github.com/valyala/fasthttp"
	"github.com/valyala/fasthttp/fasthttputil"
)

type integrationCustomCtx struct {
	*fiber.DefaultCtx
}

func newIntegrationCustomCtx(app *fiber.App) fiber.CustomCtx {
	return &integrationCustomCtx{DefaultCtx: fiber.NewDefaultCtx(app)}
}

func performOversizedRequest(t *testing.T, app *fiber.App, configure func(req *fasthttp.Request)) *fasthttp.Response {
	t.Helper()

	ln := fasthttputil.NewInmemoryListener()
	errCh := make(chan error, 1)

	go func() {
		errCh <- app.Listener(ln, fiber.ListenConfig{DisableStartupMessage: true})
	}()

	t.Cleanup(func() {
		require.NoError(t, app.Shutdown())
		if err := <-errCh; err != nil && !errors.Is(err, net.ErrClosed) {
			require.NoError(t, err)
		}
	})

	require.Eventually(t, func() bool {
		conn, err := ln.Dial()
		if err != nil {
			return false
// ... (560 more lines)

Domain

Subdomains

Dependencies

  • bytes

Frequently Asked Questions

What does app_integration_test.go do?
app_integration_test.go is a source file in the fiber codebase, written in go. It belongs to the FiberCore domain, Context subdomain.
What functions are defined in app_integration_test.go?
app_integration_test.go defines 13 function(s): Test_Integration_App_ServerErrorHandler_GroupMiddlewareChain, Test_Integration_App_ServerErrorHandler_MiddlewareCombinationHeaders, Test_Integration_App_ServerErrorHandler_PreservesCORSHeadersOnBodyLimit, Test_Integration_App_ServerErrorHandler_PreservesHelmetHeadersOnBodyLimit, Test_Integration_App_ServerErrorHandler_PreservesRequestID, Test_Integration_App_ServerErrorHandler_RetainsHeadersFromSubsequentMiddleware, Test_Integration_App_ServerErrorHandler_WithCustomCtx, app, error, newIntegrationCustomCtx, and 3 more.
What does app_integration_test.go depend on?
app_integration_test.go imports 1 module(s): bytes.
Where is app_integration_test.go in the architecture?
app_integration_test.go is located at app_integration_test.go (domain: FiberCore, subdomain: Context).

Analyze Your Own Codebase

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

Try Supermodel Free