sinktest

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package sinktest has helpers for the sinks' tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Entries

func Entries() []logging.Entry

Entries are a few entries covering the kinds of values.

Types

type Request

type Request struct {
	Path   string
	Header http.Header
	Body   []byte
}

Request is a request a Server got, its body decompressed.

type Server

type Server struct {
	*httptest.Server

	Requests []Request
	Statuses []int
	// contains filtered or unexported fields
}

Server records requests and answers them with the next status from Statuses, then 200s.

func NewServer

func NewServer(t *testing.T) *Server

NewServer starts a Server, closed when t ends.

func (*Server) Last

func (s *Server) Last(t *testing.T) Request

Last returns the last request.

Jump to

Keyboard shortcuts

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