testhelpers

package
v0.0.0-...-757a075 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CreateSuccessServResp string = `{"result":"saved"}`
	CreateFailServeResp   string = `{"result":"failure"}`
	DeleteSuccessServResp string = `{"result":"deleted"}`
	DeleteFailServeResp   string = `{"result":"failure"}`
	ReconfigureResp       string = `{"result":""}`
)

Variables

This section is empty.

Functions

func TestHandler

func TestHandler(tb testing.TB, responses []string) (http.HandlerFunc, map[string][]string)

Types

type TestServer

type TestServer struct {
	// contains filtered or unexported fields
}

func ServerForTest

func ServerForTest(t *testing.T, handler http.Handler) *TestServer

func (TestServer) Client

func (ts TestServer) Client() *http.Client

func (TestServer) Config

func (ts TestServer) Config() config.Config

Jump to

Keyboard shortcuts

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