testutils

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckNoError added in v0.0.3

func CheckNoError(t *testing.T, err error)

func NewTestClient

func NewTestClient(respoceCreator RoundTripFunc) *http.Client

Types

type MidelwaresTracker

type MidelwaresTracker struct {
	CallsOrder []string
	// contains filtered or unexported fields
}

func NewMidelwaresTracker

func NewMidelwaresTracker(t *testing.T) *MidelwaresTracker

func (*MidelwaresTracker) MakeFinalMidelware

func (t *MidelwaresTracker) MakeFinalMidelware(name string) *mocks.HandlingMiddlewareMock

func (*MidelwaresTracker) MakeMidelware

func (t *MidelwaresTracker) MakeMidelware(name string) *mocks.HandlingMiddlewareMock

type RoundTripFunc

type RoundTripFunc func(req *http.Request) *http.Response

func (RoundTripFunc) RoundTrip

func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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