client_test.go — fiber Source File
Architecture documentation for client_test.go, a go file in the fiber codebase. 1 imports, 0 dependents.
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
Functions
- Benchmark_Client_Request()
- Benchmark_Client_Request_Parallel()
- Benchmark_Client_Request_Send_ContextCancel()
- TestClientCBORUnmarshalOverride()
- TestClientLoggerAccessors()
- TestClientResetClearsState()
- TestClientSetRootCertificateErrors()
- TestClientSetRootCertificateFromStringError()
- TestClientUnderlyingTransports()
- Test_Client_Add_Hook()
- Test_Client_Add_Hook_CheckOrder()
- Test_Client_ConcurrencyRequests()
- Test_Client_Cookie()
- Test_Client_CookieJar()
- Test_Client_CookieJar_Response()
- Test_Client_Cookie_With_Server()
- Test_Client_Header()
- Test_Client_Header_With_Server()
- Test_Client_HostClient_Behavior()
- Test_Client_Invalid_URL()
- Test_Client_LBClient_Behavior()
- Test_Client_Marshal()
- Test_Client_PathParam()
- Test_Client_PathParam_With_Server()
- Test_Client_QueryParam()
- Test_Client_QueryParam_With_Server()
- Test_Client_R()
- Test_Client_Referer()
- Test_Client_SetBaseURL()
- Test_Client_SetCertificates()
- Test_Client_SetProxyURL()
- Test_Client_SetRetryConfig()
- Test_Client_SetRootCertificate()
- Test_Client_SetRootCertificateFromString()
- Test_Client_StreamResponseBody()
- Test_Client_TLS()
- Test_Client_TLS_Empty_TLSConfig()
- Test_Client_TLS_Error()
- Test_Client_Unsupported_Protocol()
- Test_Client_UserAgent()
- Test_Delete()
- Test_Get()
- Test_Head()
- Test_New_With_Client()
- Test_New_With_HostClient()
- Test_New_With_LBClient()
- Test_Options()
- Test_Patch()
- Test_Post()
- Test_Put()
- Test_Replace()
- Test_Set_Config_To_Request()
- startTestServerWithPort()
Dependencies
- context
Source
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