tester

package
v0.0.0-...-6a5da2a Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateServerTester

func CreateServerTester(t *testing.T, hostname string, port string, jar *cookiejar.Jar) func(method string, url string, header map[string]string, payload string, expectedStatus int, expectedBody string) string

CreateServerTester wraps doRequestOnServer to factorize t, port and jar

func DoRequestOnHandler

func DoRequestOnHandler(t *testing.T, router http.Handler, method string, route string, header Header, payload string, expectedStatus int, expectedBody string) string

DoRequestOnHandler does a request on a router (or handler) and check the response

Types

type Header struct {
	Key   string
	Value string
}

Header is a http header

Jump to

Keyboard shortcuts

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