Documentation ¶
Index ¶
- func AssertJSON(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool
- func AssertQuery(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool
- func AssertURL(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool
- func AssertXML(t *testing.T, expect, actual string, container interface{}, ...) bool
- func Match(t *testing.T, regex, expected string)
- func NewClient(cfgs ...*aws.Config) *client.Client
- func SortedKeys(m map[string]interface{}) []string
- type FakeContext
- type ReadCloser
- type ZeroReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertJSON ¶
AssertJSON verifies that the expect json string matches the actual.
func AssertQuery ¶
AssertQuery verifies the expect HTTP query string matches the actual.
func AssertXML ¶
func AssertXML(t *testing.T, expect, actual string, container interface{}, msgAndArgs ...interface{}) bool
AssertXML verifies that the expect xml string matches the actual.
func Match ¶
Match is a testing helper to test for testing error by comparing expected with a regular expression.
func NewClient ¶ added in v1.0.0
NewClient creates and initializes a generic service client for testing.
func SortedKeys ¶
SortedKeys returns a sorted slice of keys of a map.
Types ¶
type FakeContext ¶ added in v1.8.0
type FakeContext struct { Error error DoneCh chan struct{} }
A FakeContext provides a simple stub implementation of a Context
func (*FakeContext) Deadline ¶ added in v1.8.0
func (c *FakeContext) Deadline() (deadline time.Time, ok bool)
Deadline always will return not set
func (*FakeContext) Done ¶ added in v1.8.0
func (c *FakeContext) Done() <-chan struct{}
Done returns a read channel for listening to the Done event
func (*FakeContext) Err ¶ added in v1.8.0
func (c *FakeContext) Err() error
Err returns the error, is nil if not set.
func (*FakeContext) Value ¶ added in v1.8.0
func (c *FakeContext) Value(key interface{}) interface{}
Value ignores the Value and always returns nil
type ReadCloser ¶ added in v1.1.10
type ReadCloser struct { Size int Closed bool FillData func(bool, []byte, int, int) // contains filtered or unexported fields }
ReadCloser is a io.ReadCloser for unit testing. Designed to test for leaks and whether a handle has been closed
func (*ReadCloser) Close ¶ added in v1.1.10
func (r *ReadCloser) Close() error
Close sets Closed to true and returns no error
type ZeroReader ¶ added in v1.1.1
type ZeroReader struct{}
ZeroReader is a io.Reader which will always write zeros to the byte slice provided.
Directories ¶
Path | Synopsis |
---|---|
integration
|
|
Package unit performs initialization and validation for unit tests
|
Package unit performs initialization and validation for unit tests |