test_util

package
v0.0.0-...-9b2d5d1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2016 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRequest

func NewRequest(method, host, rawPath string, body io.Reader) *http.Request

func NewResponse

func NewResponse(status int) *http.Response

func NextAvailPort

func NextAvailPort() uint16

func SpecConfig

func SpecConfig(statusPort, proxyPort uint16, natsPorts ...uint16) *config.Config

func SpecSSLConfig

func SpecSSLConfig(statusPort, proxyPort, SSLPort uint16, natsPorts ...uint16) *config.Config

Types

type FakeFile

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

func (*FakeFile) Read

func (f *FakeFile) Read(data *[]byte) (int, error)

func (*FakeFile) Write

func (f *FakeFile) Write(data []byte) (int, error)

type HttpConn

type HttpConn struct {
	net.Conn

	Reader *bufio.Reader
	Writer *bufio.Writer
}

func NewHttpConn

func NewHttpConn(x net.Conn) *HttpConn

func (*HttpConn) CheckLine

func (x *HttpConn) CheckLine(expected string)

func (*HttpConn) CheckLines

func (x *HttpConn) CheckLines(expected []string)

func (*HttpConn) ReadRequest

func (x *HttpConn) ReadRequest() (*http.Request, string)

func (*HttpConn) ReadResponse

func (x *HttpConn) ReadResponse() (*http.Response, string)

func (*HttpConn) WriteLine

func (x *HttpConn) WriteLine(line string)

func (*HttpConn) WriteLines

func (x *HttpConn) WriteLines(lines []string)

func (*HttpConn) WriteRequest

func (x *HttpConn) WriteRequest(req *http.Request)

func (*HttpConn) WriteResponse

func (x *HttpConn) WriteResponse(resp *http.Response)

type NATSRunner

type NATSRunner struct {
	MessageBus *nats.Conn
	// contains filtered or unexported fields
}

func NewNATSRunner

func NewNATSRunner(port int) *NATSRunner

func (*NATSRunner) KillWithFire

func (runner *NATSRunner) KillWithFire()

func (*NATSRunner) Start

func (runner *NATSRunner) Start()

func (*NATSRunner) Stop

func (runner *NATSRunner) Stop()

type Nats

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

func NewNats

func NewNats(port uint16) *Nats

func NewNatsOnRandomPort

func NewNatsOnRandomPort() *Nats

func (*Nats) Port

func (n *Nats) Port() uint16

func (*Nats) Start

func (n *Nats) Start()

func (*Nats) Stop

func (n *Nats) Stop()

Directories

Path Synopsis
rss

Jump to

Keyboard shortcuts

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