Home / File/ response_test.go — fiber Source File

response_test.go — fiber Source File

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

File go FiberClient Transport 1 imports 14 functions 2 classes

Entity Profile

Dependency Diagram

graph LR
  9a680627_ad54_340e_3faa_64ead9b39aef["response_test.go"]
  c0b86961_3ef1_0168_52fc_98627566ed27["bytes"]
  9a680627_ad54_340e_3faa_64ead9b39aef --> c0b86961_3ef1_0168_52fc_98627566ed27
  style 9a680627_ad54_340e_3faa_64ead9b39aef fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

package client

import (
	"bytes"
	"crypto/tls"
	"encoding/xml"
	"errors"
	"io"
	"net"
	"os"
	"path/filepath"
	"testing"

	"github.com/gofiber/fiber/v3/internal/tlstest"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"

	"github.com/gofiber/fiber/v3"
)

func Test_Response_Status(t *testing.T) {
	t.Parallel()

	setupApp := func() *testServer {
		server := startTestServer(t, func(app *fiber.App) {
			app.Get("/", func(c fiber.Ctx) error {
				return c.SendString("foo")
			})
			app.Get("/fail", func(c fiber.Ctx) error {
				return c.SendStatus(407)
			})
		})

		return server
	}

	t.Run("success", func(t *testing.T) {
		t.Parallel()

		server := setupApp()
		defer server.stop()

		client := New().SetDial(server.dial())

		resp, err := AcquireRequest().
			SetClient(client).
			Get("http://example")

		require.NoError(t, err)
		require.Equal(t, "OK", resp.Status())
		resp.Close()
	})

	t.Run("fail", func(t *testing.T) {
		t.Parallel()

		server := setupApp()
		defer server.stop()

// ... (897 more lines)

Domain

Subdomains

Classes

Dependencies

  • bytes

Frequently Asked Questions

What does response_test.go do?
response_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 response_test.go?
response_test.go defines 14 function(s): Benchmark_Headers, Test_Response_Body, Test_Response_BodyStream, Test_Response_BodyStream_Fallback, Test_Response_Cookie, Test_Response_DecodeHelpers_ClientNilSafety, Test_Response_Header, Test_Response_Headers, Test_Response_IsStreaming, Test_Response_Protocol, and 4 more.
What does response_test.go depend on?
response_test.go imports 1 module(s): bytes.
Where is response_test.go in the architecture?
response_test.go is located at client/response_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