testutil

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckResponse

func CheckResponse(w *httptest.ResponseRecorder, wantStatus int, wantHeaders http.Header, wantBody string)

CheckResponse checks that the http response matches expectations

func CheckResponseBody

func CheckResponseBody(w *httptest.ResponseRecorder, wantStatus int, wantBody string)

CheckResponseBody checks that the http response matches expectations

func CheckServiceUnavailable

func CheckServiceUnavailable(w *httptest.ResponseRecorder)

CheckServiceUnavailable checks if response is web.ServiceUnavailable

func CheckUnauthorized

func CheckUnauthorized(w *httptest.ResponseRecorder)

CheckUnauthorized checks if response is web.CheckUnauthorized

func NewRequest

func NewRequest(method, url string, body io.Reader) *http.Request

NewRequest is like http.NewRequest, but returns no error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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