testutil

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package testutil contains small in-process HTTP fixtures shared by package tests. It intentionally never exposes or persists authorization headers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResponsesServer

type ResponsesServer struct {
	Server  *httptest.Server
	Mu      sync.Mutex
	Calls   int
	Bodies  [][]byte
	Status  int
	Body    any
	Handler func(http.ResponseWriter, *http.Request)
}

func NewResponsesServer

func NewResponsesServer() *ResponsesServer

func (*ResponsesServer) Count

func (m *ResponsesServer) Count() int

func (*ResponsesServer) RequestBodies

func (m *ResponsesServer) RequestBodies() [][]byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL