helpers

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTestHttpServer

func GetTestHttpServer(responses map[string][]byte, expects ...ExpectedRequest) (server *httptest.Server, after func())

func GetTestHttpServerWithRequests

func GetTestHttpServerWithRequests(t *testing.T, reqs []Request) (server *httptest.Server)

Types

type ExpectedRequest

type ExpectedRequest struct {
	Url    string      `json:"url"`
	Expect interface{} `json:"expect"`
}

type Request

type Request struct {
	Method      string
	Status      int
	Url         string
	Result      []byte
	ExpectInput interface{}
}

Jump to

Keyboard shortcuts

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