testhelpers

package
v0.3.1-test Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Responce2Req

type Responce2Req struct {
	RequestURI   string
	ResponceCode int
	Delay        int
	Responce     string
}

type TestDoer

type TestDoer struct {
	R2rChan chan Responce2Req
}

func HTTPServerWithAPI

func HTTPServerWithAPI() (*api.Config, net.Listener, *TestDoer, error)

HTTPServerWithAPI creates a test HTTP server that handles requests until the listener returned is closed.

func NewTestDoer

func NewTestDoer(requestNums int) *TestDoer

func (*TestDoer) Close

func (t *TestDoer) Close()

Jump to

Keyboard shortcuts

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