mocks

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: MPL-2.0 Imports: 22 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 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) Info added in v0.4.13

func (m *MockDocker) Info(ctx context.Context) (types.Info, 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