testutils

package
v0.0.0-...-4ecb35b Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockReadCloser

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

MockReadCloser - Used within the mockURLGetter to stub out response data.

func (MockReadCloser) Close

func (m MockReadCloser) Close() error

func (MockReadCloser) Read

func (m MockReadCloser) Read(data []byte) (int, error)

type MockURLGetter

type MockURLGetter struct {
	Err    error
	Body   string
	Status int
}

MockURLGetter - allows stubbing out any external http calls via the http.Get, urlfetch.Get or other methods that match the interface

func (MockURLGetter) Get

func (u MockURLGetter) Get(url string) (*http.Response, error)

type T

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

T contains a reference to a aetest.Instance to allow for faster tests and closing of the test on completion

func (*T) Close

func (t *T) Close()

Close closes the testing instance

func (*T) GetContext

func (t *T) GetContext() context.Context

GetContext returns a new or cached context reference

Jump to

Keyboard shortcuts

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