Documentation ¶
Overview ¶
Package cloudtest provides utilities for testing, e.g. cloud service tests using mock http Transport, fake storage client, etc.
Package cloudtest provides utilities for testing, e.g. cloud service tests using mock http Transport, fake storage client, etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggingClient ¶
LoggingClient is an HTTP client that also logs all requests and responses.
func NewChannelClient ¶
NewChannelClient is an HTTP client that ignores requests and returns responses provided by a channel.
func NewLoggingClient ¶
NewLoggingClient returns an HTTP client that also logs all requests and responses.
Types ¶
type BucketHandle ¶ added in v0.1.10
type BucketHandle struct { stiface.BucketHandle ObjAttrs []*storage.ObjectAttrs // Objects that will be returned by iterator }
BucketHandle provides a fake BucketHandle implementation for testing.
func (BucketHandle) Attrs ¶ added in v0.1.10
func (bh BucketHandle) Attrs(ctx context.Context) (*storage.BucketAttrs, error)
Attrs implements trivial stiface.BucketHandle.Attrs
func (BucketHandle) Objects ¶ added in v0.1.10
func (bh BucketHandle) Objects(ctx context.Context, q *storage.Query) stiface.ObjectIterator
Objects implements stiface.BucketHandle.Objects
type GCSClient ¶ added in v0.1.10
GCSClient provides a fake storage client that can be customized with arbitrary fake bucket contents. DEPRECATED - use identical code in cloud/gcsfake
func (*GCSClient) AddTestBucket ¶ added in v0.1.10
func (c *GCSClient) AddTestBucket(name string, bh BucketHandle)
AddTestBucket adds a fake bucket for testing. DEPRECATED - use identical code in cloud/gcsfake
Directories ¶
Path | Synopsis |
---|---|
Package bqfake provides tools to construct fake bigquery datasets, tables, query responses, etc.
|
Package bqfake provides tools to construct fake bigquery datasets, tables, query responses, etc. |
Package dsfake implements a fake dsiface.Client If you make changes to existing code, please test whether it breaks existing clients, e.g.
|
Package dsfake implements a fake dsiface.Client If you make changes to existing code, please test whether it breaks existing clients, e.g. |
Package cloudtest provides utilities for testing, e.g.
|
Package cloudtest provides utilities for testing, e.g. |