Documentation ¶
Overview ¶
nolint: gomnd
Index ¶
- func CheckNoError(t *testing.T, err error)
- func CheckNoServerError(t *testing.T, err error)
- func CopyHeaders(from http.Header, to http.Header)
- func CurrentDir(t *testing.T) string
- func FsFromMap(t *testing.T, files map[string]string) afero.Fs
- func LogTest(action func(t *testing.T, output *bytes.Buffer)) func(t *testing.T)
- func NewTestClient(responseCreator RoundTripFunc) *http.Client
- func ReadBody(t *testing.T, recorder *httptest.ResponseRecorder) string
- func ReadHeader(t *testing.T, recorder *httptest.ResponseRecorder) http.Header
- func Times(n int, function func(n int))
- func UniqOutput(output *bytes.Buffer, action func(t *testing.T, output *bytes.Buffer)) func(t *testing.T)
- func WithTmpCerts(fs afero.Fs, action func(t *testing.T, certs *Certs)) func(t *testing.T)
- func WithTrueColor(action func(t *testing.T)) func(t *testing.T)
- type Certs
- type CountableHandler
- type RoundTripFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckNoError ¶ added in v0.0.3
func CheckNoServerError ¶ added in v0.0.9
func CurrentDir ¶ added in v0.3.0
func FsFromMap ¶ added in v0.0.8
FsFromMap creates afero.Fs in memory from map. Where key is a filename and value is file context.
func NewTestClient ¶
func NewTestClient(responseCreator RoundTripFunc) *http.Client
func ReadBody ¶ added in v0.0.6
func ReadBody(t *testing.T, recorder *httptest.ResponseRecorder) string
func ReadHeader ¶ added in v0.0.7
func UniqOutput ¶ added in v0.3.0
func WithTmpCerts ¶ added in v0.0.9
Types ¶
type CountableHandler ¶ added in v0.2.0
type CountableHandler struct {
// contains filtered or unexported fields
}
func NewCounter ¶ added in v0.2.0
func NewCounter(handler handlerFunc) *CountableHandler
func (*CountableHandler) Count ¶ added in v0.2.0
func (t *CountableHandler) Count() int
func (*CountableHandler) Reset ¶ added in v0.2.0
func (t *CountableHandler) Reset()
func (*CountableHandler) ServeHTTP ¶ added in v0.2.0
func (t *CountableHandler) ServeHTTP(writer contracts.ResponseWriter, request *contracts.Request)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.