Home / File/ client_test.go — fiber Source File

client_test.go — fiber Source File

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

File go FiberClient Transport 1 imports 53 functions 7 classes

Entity Profile

Dependency Diagram

graph LR
  5d11d0f7_2b3b_7bf3_3b1d_76d79d6872a2["client_test.go"]
  cc7104af_aece_1fe5_3985_791c7f34910c["context"]
  5d11d0f7_2b3b_7bf3_3b1d_76d79d6872a2 --> cc7104af_aece_1fe5_3985_791c7f34910c
  style 5d11d0f7_2b3b_7bf3_3b1d_76d79d6872a2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

package client

import (
	"context"
	"crypto/tls"
	"encoding/hex"
	"errors"
	"io"
	"net"
	"os"
	"path/filepath"
	"reflect"
	"sync"
	"sync/atomic"
	"testing"
	"time"

	"github.com/gofiber/fiber/v3"
	"github.com/gofiber/fiber/v3/addon/retry"
	"github.com/gofiber/fiber/v3/internal/tlstest"
	"github.com/gofiber/fiber/v3/log"
	"github.com/gofiber/utils/v2"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
	"github.com/valyala/bytebufferpool"
	"github.com/valyala/fasthttp"
)

func startTestServerWithPort(t *testing.T, beforeStarting func(app *fiber.App)) (app *fiber.App, addr string) { //nolint:nonamedreturns // gocritic unnamedResult requires explicit result names for clarity when returning app and address
	t.Helper()

	app = fiber.New()

	if beforeStarting != nil {
		beforeStarting(app)
	}

	addrChan := make(chan string)
	errChan := make(chan error, 1)
	go func(server *fiber.App) {
		err := server.Listen(":0", fiber.ListenConfig{
			DisableStartupMessage: true,
			ListenerAddrFunc: func(addr net.Addr) {
				addrChan <- addr.String()
			},
		})
		if err != nil {
			errChan <- err
		}
	}(app)

	select {
	case addr = <-addrChan:
		return app, addr
	case err := <-errChan:
		t.Fatalf("Failed to start test server: %v", err)
	}

	return nil, ""
}
// ... (2338 more lines)

Domain

Subdomains

Dependencies

  • context

Frequently Asked Questions

What does client_test.go do?
client_test.go is a source file in the fiber codebase, written in go. It belongs to the FiberClient domain, Transport subdomain.
What functions are defined in client_test.go?
client_test.go defines 53 function(s): Benchmark_Client_Request, Benchmark_Client_Request_Parallel, Benchmark_Client_Request_Send_ContextCancel, TestClientCBORUnmarshalOverride, TestClientLoggerAccessors, TestClientResetClearsState, TestClientSetRootCertificateErrors, TestClientSetRootCertificateFromStringError, TestClientUnderlyingTransports, Test_Client_Add_Hook, and 43 more.
What does client_test.go depend on?
client_test.go imports 1 module(s): context.
Where is client_test.go in the architecture?
client_test.go is located at client/client_test.go (domain: FiberClient, subdomain: Transport, directory: client).

Analyze Your Own Codebase

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

Try Supermodel Free