mocks

package
v0.0.0-...-b4f33a4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockedDisplayJSONMessagesStreamReturn error
View Source
var MockedExitStatus = 0
View Source
var MockedStdout string

Functions

func MockDisplayJSONMessagesStream

func MockDisplayJSONMessagesStream(in io.Reader, out io.Writer, terminalFd uintptr, isTerminal bool, auxCallback func(jsonmessage.JSONMessage)) error

func MockExecCommand

func MockExecCommand(command string, args ...string) *exec.Cmd

Types

type APIClient

type APIClient struct {
	mock.Mock
}

APIClient is an autogenerated mock type for the APIClient type

func NewAPIClient

func NewAPIClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *APIClient

NewAPIClient creates a new instance of APIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*APIClient) ContainerCreate

func (_m *APIClient) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *v1.Platform, containerName string) (container.CreateResponse, error)

ContainerCreate provides a mock function with given fields: ctx, config, hostConfig, networkingConfig, platform, containerName

func (*APIClient) ContainerExecAttach

func (_m *APIClient) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error)

ContainerExecAttach provides a mock function with given fields: ctx, execID, config

func (*APIClient) ContainerExecCreate

func (_m *APIClient) ContainerExecCreate(ctx context.Context, _a1 string, config types.ExecConfig) (types.IDResponse, error)

ContainerExecCreate provides a mock function with given fields: ctx, _a1, config

func (*APIClient) ContainerExecInspect

func (_m *APIClient) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error)

ContainerExecInspect provides a mock function with given fields: ctx, execID

func (*APIClient) ContainerInspect

func (_m *APIClient) ContainerInspect(ctx context.Context, _a1 string) (types.ContainerJSON, error)

ContainerInspect provides a mock function with given fields: ctx, _a1

func (*APIClient) ContainerList

func (_m *APIClient) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error)

ContainerList provides a mock function with given fields: ctx, options

func (*APIClient) ContainerLogs

func (_m *APIClient) ContainerLogs(ctx context.Context, _a1 string, options types.ContainerLogsOptions) (io.ReadCloser, error)

ContainerLogs provides a mock function with given fields: ctx, _a1, options

func (*APIClient) ContainerRemove

func (_m *APIClient) ContainerRemove(ctx context.Context, _a1 string, options types.ContainerRemoveOptions) error

ContainerRemove provides a mock function with given fields: ctx, _a1, options

func (*APIClient) ContainerStart

func (_m *APIClient) ContainerStart(ctx context.Context, _a1 string, options types.ContainerStartOptions) error

ContainerStart provides a mock function with given fields: ctx, _a1, options

func (*APIClient) ContainerStop

func (_m *APIClient) ContainerStop(ctx context.Context, name string, options container.StopOptions) error

ContainerStop provides a mock function with given fields: ctx, name, options

func (*APIClient) ContainerWait

func (_m *APIClient) ContainerWait(ctx context.Context, _a1 string, condition container.WaitCondition) (<-chan container.WaitResponse, <-chan error)

ContainerWait provides a mock function with given fields: ctx, _a1, condition

func (*APIClient) ImageList

func (_m *APIClient) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error)

ImageList provides a mock function with given fields: ctx, options

func (*APIClient) ImagePull

func (_m *APIClient) ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error)

ImagePull provides a mock function with given fields: ctx, ref, options

func (*APIClient) ImageRemove

func (_m *APIClient) ImageRemove(ctx context.Context, image string, options types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error)

ImageRemove provides a mock function with given fields: ctx, image, options

func (*APIClient) NetworkCreate

func (_m *APIClient) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error)

NetworkCreate provides a mock function with given fields: ctx, name, options

func (*APIClient) NetworkList

func (_m *APIClient) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error)

NetworkList provides a mock function with given fields: ctx, options

func (*APIClient) NetworkRemove

func (_m *APIClient) NetworkRemove(ctx context.Context, _a1 string) error

NetworkRemove provides a mock function with given fields: ctx, _a1

type ContainerAPIClient

type ContainerAPIClient struct {
	mock.Mock
}

ContainerAPIClient is an autogenerated mock type for the ContainerAPIClient type

func NewContainerAPIClient

func NewContainerAPIClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *ContainerAPIClient

NewContainerAPIClient creates a new instance of ContainerAPIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*ContainerAPIClient) ContainerCreate

func (_m *ContainerAPIClient) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *v1.Platform, containerName string) (container.CreateResponse, error)

ContainerCreate provides a mock function with given fields: ctx, config, hostConfig, networkingConfig, platform, containerName

func (*ContainerAPIClient) ContainerExecAttach

func (_m *ContainerAPIClient) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error)

ContainerExecAttach provides a mock function with given fields: ctx, execID, config

func (*ContainerAPIClient) ContainerExecCreate

func (_m *ContainerAPIClient) ContainerExecCreate(ctx context.Context, _a1 string, config types.ExecConfig) (types.IDResponse, error)

ContainerExecCreate provides a mock function with given fields: ctx, _a1, config

func (*ContainerAPIClient) ContainerExecInspect

func (_m *ContainerAPIClient) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error)

ContainerExecInspect provides a mock function with given fields: ctx, execID

func (*ContainerAPIClient) ContainerInspect

func (_m *ContainerAPIClient) ContainerInspect(ctx context.Context, _a1 string) (types.ContainerJSON, error)

ContainerInspect provides a mock function with given fields: ctx, _a1

func (*ContainerAPIClient) ContainerList

func (_m *ContainerAPIClient) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error)

ContainerList provides a mock function with given fields: ctx, options

func (*ContainerAPIClient) ContainerLogs

func (_m *ContainerAPIClient) ContainerLogs(ctx context.Context, _a1 string, options types.ContainerLogsOptions) (io.ReadCloser, error)

ContainerLogs provides a mock function with given fields: ctx, _a1, options

func (*ContainerAPIClient) ContainerRemove

func (_m *ContainerAPIClient) ContainerRemove(ctx context.Context, _a1 string, options types.ContainerRemoveOptions) error

ContainerRemove provides a mock function with given fields: ctx, _a1, options

func (*ContainerAPIClient) ContainerStart

func (_m *ContainerAPIClient) ContainerStart(ctx context.Context, _a1 string, options types.ContainerStartOptions) error

ContainerStart provides a mock function with given fields: ctx, _a1, options

func (*ContainerAPIClient) ContainerStop

func (_m *ContainerAPIClient) ContainerStop(ctx context.Context, name string, options container.StopOptions) error

ContainerStop provides a mock function with given fields: ctx, name, options

func (*ContainerAPIClient) ContainerWait

func (_m *ContainerAPIClient) ContainerWait(ctx context.Context, _a1 string, condition container.WaitCondition) (<-chan container.WaitResponse, <-chan error)

ContainerWait provides a mock function with given fields: ctx, _a1, condition

type ImageAPIClient

type ImageAPIClient struct {
	mock.Mock
}

ImageAPIClient is an autogenerated mock type for the ImageAPIClient type

func NewImageAPIClient

func NewImageAPIClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *ImageAPIClient

NewImageAPIClient creates a new instance of ImageAPIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*ImageAPIClient) ImageList

func (_m *ImageAPIClient) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error)

ImageList provides a mock function with given fields: ctx, options

func (*ImageAPIClient) ImagePull

func (_m *ImageAPIClient) ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error)

ImagePull provides a mock function with given fields: ctx, ref, options

func (*ImageAPIClient) ImageRemove

ImageRemove provides a mock function with given fields: ctx, image, options

type NetworkAPIClient

type NetworkAPIClient struct {
	mock.Mock
}

NetworkAPIClient is an autogenerated mock type for the NetworkAPIClient type

func NewNetworkAPIClient

func NewNetworkAPIClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *NetworkAPIClient

NewNetworkAPIClient creates a new instance of NetworkAPIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*NetworkAPIClient) NetworkCreate

func (_m *NetworkAPIClient) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error)

NetworkCreate provides a mock function with given fields: ctx, name, options

func (*NetworkAPIClient) NetworkList

NetworkList provides a mock function with given fields: ctx, options

func (*NetworkAPIClient) NetworkRemove

func (_m *NetworkAPIClient) NetworkRemove(ctx context.Context, network string) error

NetworkRemove provides a mock function with given fields: ctx, network

type ReadCloser

type ReadCloser struct {
	ExpectedData []byte
	ExpectedErr  error
}

func (*ReadCloser) Close

func (m *ReadCloser) Close() error

func (*ReadCloser) Read

func (m *ReadCloser) Read(p []byte) (n int, err error)

type ViperClient

type ViperClient struct {
	mock.Mock
}

ViperClient is an autogenerated mock type for the ViperClient type

func NewViperClient

func NewViperClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *ViperClient

NewViperClient creates a new instance of ViperClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*ViperClient) AddConfigPath

func (_m *ViperClient) AddConfigPath(in string)

AddConfigPath provides a mock function with given fields: in

func (*ViperClient) GetTime

func (_m *ViperClient) GetTime(key string) time.Time

GetTime provides a mock function with given fields: key

func (*ViperClient) ReadInConfig

func (_m *ViperClient) ReadInConfig() error

ReadInConfig provides a mock function with given fields:

func (*ViperClient) SafeWriteConfig

func (_m *ViperClient) SafeWriteConfig() error

SafeWriteConfig provides a mock function with given fields:

func (*ViperClient) Set

func (_m *ViperClient) Set(key string, value interface{})

Set provides a mock function with given fields: key, value

func (*ViperClient) SetConfigName

func (_m *ViperClient) SetConfigName(in string)

SetConfigName provides a mock function with given fields: in

func (*ViperClient) SetConfigType

func (_m *ViperClient) SetConfigType(in string)

SetConfigType provides a mock function with given fields: in

func (*ViperClient) WriteConfig

func (_m *ViperClient) WriteConfig() error

WriteConfig provides a mock function with given fields:

Jump to

Keyboard shortcuts

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