mocks

package
v0.3.51 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Getter

type Getter struct {
	mock.Mock
}

func (*Getter) Get

func (mb *Getter) Get(src, dst string) error

func (*Getter) SetForce

func (mb *Getter) SetForce(force bool)

type ImageLog added in v0.0.19

type ImageLog struct {
	mock.Mock
}

func (*ImageLog) Clear added in v0.0.19

func (i *ImageLog) Clear() error

func (*ImageLog) Log added in v0.0.19

func (i *ImageLog) Log(n, t string) error

func (*ImageLog) Read added in v0.0.19

func (i *ImageLog) Read(t string) ([]string, error)

type MockConnectorServer added in v0.3.3

type MockConnectorServer struct {
	mock.Mock
	// contains filtered or unexported fields
}

func NewMockConnectorServer added in v0.3.3

func NewMockConnectorServer() *MockConnectorServer

func (*MockConnectorServer) DestroyService added in v0.3.3

func (*MockConnectorServer) ExposeService added in v0.3.3

func (*MockConnectorServer) ListServices added in v0.3.3

func (*MockConnectorServer) OpenStream added in v0.3.3

func (*MockConnectorServer) Start added in v0.3.3

func (m *MockConnectorServer) Start(addr, rootCertPath, rootKeyPath, leafCertPath, leafKeyPath string) (string, error)

Start the server returning the location

func (*MockConnectorServer) Stop added in v0.3.3

func (m *MockConnectorServer) Stop()

type MockContainerTasks

type MockContainerTasks struct {
	mock.Mock
}

func (*MockContainerTasks) AttachNetwork added in v0.1.0

func (d *MockContainerTasks) AttachNetwork(network, containerid string, aliases []string, ipaddress string) error

func (*MockContainerTasks) BuildContainer added in v0.1.0

func (m *MockContainerTasks) BuildContainer(config *config.Container, force bool) (string, error)

func (*MockContainerTasks) ContainerInfo added in v0.1.0

func (m *MockContainerTasks) ContainerInfo(id string) (interface{}, error)

func (*MockContainerTasks) ContainerLogs

func (d *MockContainerTasks) ContainerLogs(id string, stdOut, stdErr bool) (io.ReadCloser, error)

func (*MockContainerTasks) CopyFileToContainer added in v0.1.18

func (d *MockContainerTasks) CopyFileToContainer(id, src, dst string) error

func (*MockContainerTasks) CopyFilesToVolume added in v0.2.16

func (d *MockContainerTasks) CopyFilesToVolume(volume string, files []string, path string, force bool) ([]string, error)

func (*MockContainerTasks) CopyFromContainer

func (d *MockContainerTasks) CopyFromContainer(id, src, dst string) error

func (*MockContainerTasks) CopyLocalDockerImagesToVolume added in v0.2.16

func (d *MockContainerTasks) CopyLocalDockerImagesToVolume(images []string, volume string, force bool) ([]string, error)

func (*MockContainerTasks) CreateContainer

func (m *MockContainerTasks) CreateContainer(c *config.Container) (id string, err error)

func (*MockContainerTasks) CreateShell

func (d *MockContainerTasks) CreateShell(id string, command []string, stdin io.ReadCloser, stdout io.Writer, stderr io.Writer) error

func (*MockContainerTasks) CreateVolume

func (m *MockContainerTasks) CreateVolume(name string) (id string, err error)

func (*MockContainerTasks) DetachNetwork

func (d *MockContainerTasks) DetachNetwork(network, containerid string) error

func (*MockContainerTasks) ExecuteCommand

func (d *MockContainerTasks) ExecuteCommand(id string, command []string, env []string, workingDirectory string, user, group string, writer io.Writer) error

func (*MockContainerTasks) FindContainerIDs

func (m *MockContainerTasks) FindContainerIDs(name string, typeName config.ResourceType) ([]string, error)

func (*MockContainerTasks) ListNetworks added in v0.1.0

func (d *MockContainerTasks) ListNetworks(id string) []config.NetworkAttachment

func (*MockContainerTasks) PullImage

func (m *MockContainerTasks) PullImage(i config.Image, f bool) error

func (*MockContainerTasks) RemoveContainer

func (m *MockContainerTasks) RemoveContainer(id string, force bool) error

func (*MockContainerTasks) RemoveVolume

func (m *MockContainerTasks) RemoveVolume(name string) error

func (*MockContainerTasks) SetForcePull

func (m *MockContainerTasks) SetForcePull(f bool)

type MockDocker

type MockDocker struct {
	mock.Mock
}

func (*MockDocker) ContainerCreate

func (m *MockDocker) ContainerCreate(
	ctx context.Context,
	config *container.Config,
	hostConfig *container.HostConfig,
	networkingConfig *network.NetworkingConfig,
	platform *specs.Platform,
	containerName string,
) (container.ContainerCreateCreatedBody, error)

func (*MockDocker) ContainerExecAttach

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

func (*MockDocker) ContainerExecCreate

func (m *MockDocker) ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.IDResponse, error)

func (*MockDocker) ContainerExecInspect

func (m *MockDocker) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error)

func (*MockDocker) ContainerExecResize

func (m *MockDocker) ContainerExecResize(ctx context.Context, execID string, config types.ResizeOptions) error

func (*MockDocker) ContainerExecStart

func (m *MockDocker) ContainerExecStart(ctx context.Context, execID string, config types.ExecStartCheck) error

func (*MockDocker) ContainerInspect added in v0.1.0

func (m *MockDocker) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error)

func (*MockDocker) ContainerList

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

func (*MockDocker) ContainerLogs

func (m *MockDocker) ContainerLogs(ctx context.Context, containerID string, options types.ContainerLogsOptions) (io.ReadCloser, error)

func (*MockDocker) ContainerRemove

func (m *MockDocker) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error

func (*MockDocker) ContainerStart

func (m *MockDocker) ContainerStart(ctx context.Context, ID string, opts types.ContainerStartOptions) error

func (*MockDocker) ContainerStop

func (m *MockDocker) ContainerStop(ctx context.Context, containerID string, timeout *time.Duration) error

func (*MockDocker) CopyFromContainer

func (m *MockDocker) CopyFromContainer(ctx context.Context, containerID, srcPath string) (io.ReadCloser, types.ContainerPathStat, error)

func (*MockDocker) CopyToContainer

func (m *MockDocker) CopyToContainer(ctx context.Context, container, path string, content io.Reader, options types.CopyToContainerOptions) error

func (*MockDocker) ImageBuild added in v0.1.0

func (m *MockDocker) ImageBuild(ctx context.Context, buildContext io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)

func (*MockDocker) ImageList

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

func (*MockDocker) ImagePull

func (m *MockDocker) ImagePull(ctx context.Context, refStr string, options types.ImagePullOptions) (io.ReadCloser, error)

func (*MockDocker) ImageRemove added in v0.0.19

func (m *MockDocker) ImageRemove(ctx context.Context, imageID string, options types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error)

func (*MockDocker) ImageSave

func (m *MockDocker) ImageSave(ctx context.Context, imageIDs []string) (io.ReadCloser, error)

func (*MockDocker) NetworkConnect

func (m *MockDocker) NetworkConnect(ctx context.Context, networkID, containerID string, config *network.EndpointSettings) error

func (*MockDocker) NetworkCreate

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

func (*MockDocker) NetworkDisconnect

func (m *MockDocker) NetworkDisconnect(ctx context.Context, networkID, containerID string, force bool) error

func (*MockDocker) NetworkList

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

func (*MockDocker) NetworkRemove

func (m *MockDocker) NetworkRemove(ctx context.Context, networkID string) error

func (*MockDocker) ServerVersion added in v0.3.39

func (m *MockDocker) ServerVersion(ctx context.Context) (types.Version, error)

func (*MockDocker) VolumeCreate

func (m *MockDocker) VolumeCreate(ctx context.Context, options volumetypes.VolumeCreateBody) (types.Volume, error)

func (*MockDocker) VolumeList added in v0.0.20

func (m *MockDocker) VolumeList(ctx context.Context, filters filters.Args) (volume.VolumeListOKBody, error)

func (*MockDocker) VolumeRemove

func (m *MockDocker) VolumeRemove(ctx context.Context, volumeID string, force bool) error

type MockHTTP

type MockHTTP struct {
	mock.Mock
}

MockHTTP is a mock implementation of the HTTP client interface

func (*MockHTTP) Do

func (m *MockHTTP) Do(r *http.Request) (*http.Response, error)

func (*MockHTTP) HealthCheckHTTP

func (m *MockHTTP) HealthCheckHTTP(uri string, codes []int, timeout time.Duration) error

type MockHelm

type MockHelm struct {
	mock.Mock
}

func (*MockHelm) Create

func (h *MockHelm) Create(kubeConfig, name, namespace string, createNamespace bool, skipCRDs bool, chart, version, valuesPath string, valueString map[string]string) error

func (*MockHelm) Destroy

func (h *MockHelm) Destroy(kubeConfig, name, namespace string) error

func (*MockHelm) UpsertChartRepository added in v0.3.42

func (h *MockHelm) UpsertChartRepository(name, url string) error

type MockNomad

type MockNomad struct {
	mock.Mock
}

func (*MockNomad) Create

func (m *MockNomad) Create(files []string) error

func (*MockNomad) Endpoints added in v0.1.16

func (m *MockNomad) Endpoints(job, group, task string) ([]map[string]string, error)

func (*MockNomad) HealthCheckAPI

func (m *MockNomad) HealthCheckAPI(timeout time.Duration) error

func (*MockNomad) JobRunning added in v0.1.16

func (m *MockNomad) JobRunning(job string) (bool, error)

func (*MockNomad) ParseJob

func (m *MockNomad) ParseJob(file string) ([]byte, error)

func (*MockNomad) SetConfig

func (m *MockNomad) SetConfig(c utils.ClusterConfig, ctx string) error

func (*MockNomad) Stop

func (m *MockNomad) Stop(files []string) error

type System

type System struct {
	mock.Mock
}

func (*System) CheckVersion added in v0.0.19

func (b *System) CheckVersion(current string) (string, bool)

func (*System) OpenBrowser

func (b *System) OpenBrowser(uri string) error

func (*System) Preflight

func (b *System) Preflight() (string, error)

func (*System) PromptInput added in v0.1.0

func (b *System) PromptInput(in io.Reader, out io.Writer, message string) string

Jump to

Keyboard shortcuts

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