Documentation
¶
Overview ¶
Package dockertest provides an in-memory fake of the read-only Docker API used by StackSentry, for tests that must not depend on a Docker daemon.
Index ¶
- type Fake
- func (f *Fake) Close() error
- func (f *Fake) ContainerInspect(_ context.Context, id string, _ client.ContainerInspectOptions) (client.ContainerInspectResult, error)
- func (f *Fake) ContainerList(context.Context, client.ContainerListOptions) (client.ContainerListResult, error)
- func (f *Fake) DiskUsage(context.Context, client.DiskUsageOptions) (client.DiskUsageResult, error)
- func (f *Fake) ImageList(_ context.Context, opts client.ImageListOptions) (client.ImageListResult, error)
- func (f *Fake) Info(context.Context, client.InfoOptions) (client.SystemInfoResult, error)
- func (f *Fake) Ping(context.Context, client.PingOptions) (client.PingResult, error)
- func (f *Fake) ServerVersion(context.Context, client.ServerVersionOptions) (client.ServerVersionResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fake ¶
type Fake struct {
PingErr, VersionErr, InfoErr, ListErr, InspectErr, ImageErr, DiskUsageErr error
Version client.ServerVersionResult
SystemInfo system.Info
Containers []container.Summary
Inspect map[string]container.InspectResponse
Images []image.Summary
Usage client.DiskUsageResult
// ImageFilters records the filters of the last ImageList call.
ImageFilters client.Filters
// Closed is set by Close.
Closed bool
}
Fake implements docker.API. A non-nil error field makes the corresponding call fail.
func (*Fake) ContainerInspect ¶
func (f *Fake) ContainerInspect(_ context.Context, id string, _ client.ContainerInspectOptions) (client.ContainerInspectResult, error)
ContainerInspect implements docker.API.
func (*Fake) ContainerList ¶
func (f *Fake) ContainerList(context.Context, client.ContainerListOptions) (client.ContainerListResult, error)
ContainerList implements docker.API.
func (*Fake) DiskUsage ¶
func (f *Fake) DiskUsage(context.Context, client.DiskUsageOptions) (client.DiskUsageResult, error)
DiskUsage implements docker.API.
func (*Fake) ImageList ¶
func (f *Fake) ImageList(_ context.Context, opts client.ImageListOptions) (client.ImageListResult, error)
ImageList implements docker.API.
func (*Fake) Info ¶
func (f *Fake) Info(context.Context, client.InfoOptions) (client.SystemInfoResult, error)
Info implements docker.API.
func (*Fake) Ping ¶
func (f *Fake) Ping(context.Context, client.PingOptions) (client.PingResult, error)
Ping implements docker.API.
func (*Fake) ServerVersion ¶
func (f *Fake) ServerVersion(context.Context, client.ServerVersionOptions) (client.ServerVersionResult, error)
ServerVersion implements docker.API.
Click to show internal directories.
Click to hide internal directories.