Documentation ¶
Index ¶
- func CheckError(t *testing.T, shouldErr bool, err error)
- func CheckErrorAndDeepEqual(t *testing.T, shouldErr bool, err error, expected, actual interface{})
- func CheckErrorAndTypeEquality(t *testing.T, shouldErr bool, err error, expected, actual interface{})
- func ServeFile(t *testing.T, content []byte) (url string, tearDown func())
- func SetEnvs(t *testing.T, envs map[string]string) func(*testing.T)
- func TempDir(t *testing.T) (name string, tearDown func())
- func TempFile(t *testing.T, prefix string, content []byte) (name string, tearDown func())
- type BadReader
- type BadWriter
- type FakeCmd
- type FakeImageAPIClient
- func (f *FakeImageAPIClient) Close() error
- func (f *FakeImageAPIClient) ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
- func (f *FakeImageAPIClient) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error)
- func (f *FakeImageAPIClient) ImagePush(_ context.Context, _ string, _ types.ImagePushOptions) (io.ReadCloser, error)
- func (f *FakeImageAPIClient) ImageTag(ctx context.Context, image, ref string) error
- func (f *FakeImageAPIClient) Info(ctx context.Context) (types.Info, error)
- type FakeImageAPIOptions
- type FakeReaderCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckErrorAndDeepEqual ¶
func ServeFile ¶ added in v0.2.0
ServeFile serves a file with http. Returns the url to the file and a teardown function that should be called to properly stop the server.
func SetEnvs ¶
SetEnvs takes a map of key values to set using os.Setenv and returns a function that can be called to reset the envs to their previous values.
Types ¶
type FakeCmd ¶ added in v0.6.0
type FakeCmd struct {
// contains filtered or unexported fields
}
func NewFakeCmd ¶ added in v0.6.0
func NewFakeCmdOut ¶ added in v0.6.0
type FakeImageAPIClient ¶
func NewFakeImageAPIClient ¶
func NewFakeImageAPIClient(initContents map[string]string, opts *FakeImageAPIOptions) *FakeImageAPIClient
func (*FakeImageAPIClient) Close ¶
func (f *FakeImageAPIClient) Close() error
func (*FakeImageAPIClient) ImageBuild ¶
func (f *FakeImageAPIClient) ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
func (*FakeImageAPIClient) ImageList ¶
func (f *FakeImageAPIClient) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error)
func (*FakeImageAPIClient) ImagePush ¶
func (f *FakeImageAPIClient) ImagePush(_ context.Context, _ string, _ types.ImagePushOptions) (io.ReadCloser, error)
type FakeImageAPIOptions ¶
type FakeReaderCloser ¶
type FakeReaderCloser struct {
Err error
}
func (FakeReaderCloser) Close ¶
func (f FakeReaderCloser) Close() error
Click to show internal directories.
Click to hide internal directories.