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 NewFakeImageAPIClientCloser() (client.ImageAPIClient, io.Closer, error)
- func NewFakeImageAPIClientCloserBuildError() (client.ImageAPIClient, io.Closer, error)
- func NewFakeImageAPIClientCloserListError() (client.ImageAPIClient, io.Closer, error)
- func NewFakeImageAPIClientCloserTagError() (client.ImageAPIClient, io.Closer, error)
- func ServeFile(t *testing.T, content []byte) (url string, tearDown func())
- func SetEnvs(t *testing.T, envs map[string]string) func(*testing.T)
- func TempFile(t *testing.T, prefix string, content []byte) (name string, tearDown func())
- type BadReader
- type BadWriter
- 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
- type FakeImageAPIOptions
- type FakeReaderCloser
- type FakeRunCommand
- type MultiFakeRunCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckErrorAndDeepEqual ¶
func NewFakeImageAPIClientCloser ¶
func NewFakeImageAPIClientCloser() (client.ImageAPIClient, io.Closer, error)
func NewFakeImageAPIClientCloserBuildError ¶
func NewFakeImageAPIClientCloserBuildError() (client.ImageAPIClient, io.Closer, error)
func NewFakeImageAPIClientCloserListError ¶
func NewFakeImageAPIClientCloserListError() (client.ImageAPIClient, io.Closer, error)
func NewFakeImageAPIClientCloserTagError ¶
func NewFakeImageAPIClientCloserTagError() (client.ImageAPIClient, io.Closer, error)
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.
Types ¶
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
type FakeRunCommand ¶
type FakeRunCommand struct {
// contains filtered or unexported fields
}
func NewFakeRunCommand ¶
func NewFakeRunCommand(stdout, stderr string, err error) *FakeRunCommand
func (*FakeRunCommand) RunCommand ¶
type MultiFakeRunCommand ¶
type MultiFakeRunCommand struct {
// contains filtered or unexported fields
}
func NewMultiFakeRunCommand ¶
func NewMultiFakeRunCommand(r map[string]*FakeRunCommand) *MultiFakeRunCommand
func (*MultiFakeRunCommand) RunCommand ¶
Click to show internal directories.
Click to hide internal directories.