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
Click to show internal directories.
Click to hide internal directories.