test

package
v0.0.0-...-6043874 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIRequest

type APIRequest struct {
	Method           string
	Path             string
	RequestJSON      interface{} //if non-nil, will be encoded as JSON
	ExpectStatusCode int
	ExpectBody       *string //raw content (not a file path)
	ExpectJSON       string  //path to JSON file
	ExpectFile       string  //path to arbitrary file
}

APIRequest contains all metadata about a test request.

func (APIRequest) Check

func (r APIRequest) Check(t *testing.T, handler http.Handler)

Check performs the HTTP request described by this APIRequest against the given http.Handler and compares the response with the expectation in the APIRequest.

Directories

Path Synopsis
Command gocovcat combines multiple go cover runs, and prints the result on stdout.
Command gocovcat combines multiple go cover runs, and prints the result on stdout.

Jump to

Keyboard shortcuts

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