awstesting

package
v1.4.19 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertJSON

func AssertJSON(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool

AssertJSON verifies that the expect json string matches the actual.

func AssertQuery

func AssertQuery(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool

AssertQuery verifies the expect HTTP query string matches the actual.

func AssertURL

func AssertURL(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool

AssertURL verifies the expected URL is 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

func Match(t *testing.T, regex, expected string)

Match is a testing helper to test for testing error by comparing expected with a regular expression.

func NewClient added in v1.0.0

func NewClient(cfgs ...*aws.Config) *client.Client

NewClient creates and initializes a generic service client for testing.

func SortedKeys

func SortedKeys(m map[string]interface{}) []string

SortedKeys returns a sorted slice of keys of a map.

Types

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

func (*ReadCloser) Read added in v1.1.10

func (r *ReadCloser) Read(b []byte) (int, error)

Read will call FillData and fill it with whatever data needed. Decrements the size until zero, then return io.EOF.

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.

func (*ZeroReader) Read added in v1.1.1

func (r *ZeroReader) Read(b []byte) (int, error)

Read fills the provided byte slice with zeros returning the number of bytes written.

Directories

Path Synopsis
integration
Package unit performs initialization and validation for unit tests
Package unit performs initialization and validation for unit tests

Jump to

Keyboard shortcuts

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