mock

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerBuildContext

type DockerBuildContext struct {
	mock.Mock
}

func NewDockerBuildContext

func NewDockerBuildContext() *DockerBuildContext

NewDockerBuildContext creates a new mock for docker build context

func (*DockerBuildContext) GenerateContextFilesystem

func (context *DockerBuildContext) GenerateContextFilesystem() (*filesystem.ContextFilesystem, error)

type DockerClient

type DockerClient struct {
	mock.Mock
}

DockerClient is a docker client mock

func NewDockerClient

func NewDockerClient() *DockerClient

NewDockerClient creates a new mock for docker client

func (*DockerClient) ImageBuild

func (c *DockerClient) ImageBuild(ctx context.Context, buildContext io.Reader, options client.ImageBuildOptions) (client.ImageBuildResult, error)

ImageBuild is mock method to build docker images

func (*DockerClient) ImagePull

ImagePull is a mock method to pull docker images from registry

func (*DockerClient) ImagePush

ImagePush is a mock method to push docker images to registry

func (*DockerClient) ImageRemove

func (c *DockerClient) ImageRemove(ctx context.Context, imageID string, options client.ImageRemoveOptions) (client.ImageRemoveResult, error)

ImageRemove is a mock method to remove docker images locally

func (*DockerClient) ImageTag

ImageTag is a mock method to tag docker images

type ImageResponse added in v0.13.0

type ImageResponse struct {
	io.ReadCloser
}

ImageResponse is a test fake implementing client.ImagePullResponse and client.ImagePushResponse (both embed io.ReadCloser plus JSONMessages/Wait).

func NewImageResponse added in v0.13.0

func NewImageResponse(rc io.ReadCloser) ImageResponse

NewImageResponse wraps an io.ReadCloser as an ImagePull/Push response fake

func (ImageResponse) JSONMessages added in v0.13.0

func (r ImageResponse) JSONMessages(ctx context.Context) iter.Seq2[jsonstream.Message, error]

JSONMessages implements client.ImagePullResponse / client.ImagePushResponse

func (ImageResponse) Wait added in v0.13.0

func (r ImageResponse) Wait(ctx context.Context) error

Wait implements client.ImagePullResponse / client.ImagePushResponse

Jump to

Keyboard shortcuts

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