Documentation ¶
Index ¶
- type CCYReader
- type FakeArtifactDownloader
- type FakeClient
- func (fc *FakeClient) ContainerCreate(ctx context.Context, config *container.Config, ...) (container.ContainerCreateCreatedBody, error)
- func (fc *FakeClient) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error)
- func (fc *FakeClient) ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.IDResponse, error)
- func (fc *FakeClient) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error)
- func (fc *FakeClient) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error)
- func (fc *FakeClient) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error)
- func (fc *FakeClient) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error
- func (fc *FakeClient) ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error
- func (fc *FakeClient) ContainerStatPath(ctx context.Context, containerID, path string) (types.ContainerPathStat, error)
- func (fc *FakeClient) ContainerStop(ctx context.Context, containerID string, timeout *time.Duration) error
- func (fc *FakeClient) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error)
- func (fc *FakeClient) CopyToContainer(ctx context.Context, container, path string, content io.Reader, ...) error
- func (fc *FakeClient) HasBaseImage(ctx context.Context, img string) (bool, error)
- func (fc *FakeClient) ImageInspectWithRaw(ctx context.Context, imageID string) (types.ImageInspect, []byte, error)
- func (fc *FakeClient) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error)
- func (fc *FakeClient) ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error)
- func (fc *FakeClient) ServerVersion(ctx context.Context) (types.Version, error)
- type FakeDevicesReader
- type FakeEmulatorsReader
- type FakeFrameworkInfoReader
- func (fir *FakeFrameworkInfoReader) Frameworks(ctx context.Context) ([]framework.Framework, error)
- func (fir *FakeFrameworkInfoReader) Search(ctx context.Context, opts framework.SearchOptions) (framework.Metadata, error)
- func (fir *FakeFrameworkInfoReader) Versions(ctx context.Context, frameworkName string) ([]framework.Metadata, error)
- type FakeJobReader
- func (fjr *FakeJobReader) GetJobAssetFileContent(ctx context.Context, jobID, fileName string, realDevice bool) ([]byte, error)
- func (fjr *FakeJobReader) GetJobAssetFileNames(ctx context.Context, jobID string, realDevice bool) ([]string, error)
- func (fjr *FakeJobReader) PollJob(ctx context.Context, id string, interval, timeout time.Duration, ...) (job.Job, error)
- func (fjr *FakeJobReader) ReadJob(ctx context.Context, id string, realDevice bool) (job.Job, error)
- type FakeJobStarter
- type FakeJobStopper
- type FakeJobWriter
- type FakeProjectUploader
- func (fpu *FakeProjectUploader) Download(id string) (io.ReadCloser, int64, error)
- func (fpu *FakeProjectUploader) Find(hash string) (storage.Item, error)
- func (fpu *FakeProjectUploader) List(opts storage.ListOptions) (storage.List, error)
- func (fpu *FakeProjectUploader) Upload(name string) (storage.Item, error)
- func (fpu *FakeProjectUploader) UploadStream(filename string, reader io.Reader) (storage.Item, error)
- type TestRunner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeArtifactDownloader ¶ added in v0.99.2
FakeArtifactDownloader defines a fake Downloader
func (*FakeArtifactDownloader) DownloadArtifact ¶ added in v0.99.2
func (f *FakeArtifactDownloader) DownloadArtifact(jobID, suiteName string, realDevice bool) []string
DownloadArtifact defines a fake function for FakeDownloader
type FakeClient ¶ added in v0.26.0
type FakeClient struct { HasBaseImageSuccess bool ServerVersionFn func(ctx context.Context) (types.Version, error) ContainerListSuccess bool ImageListSuccess bool ImagesListEmpty bool ImageInspectWithRawSuccess bool ImagePullSuccess bool ContainerCreateSuccess bool ContainerStartSuccess bool ContainerInspectSuccess bool CopyToContainerFn func(ctx context.Context, container, path string, content io.Reader, options types.CopyToContainerOptions) error ContainerStatPathSuccess bool CopyFromContainerSuccess bool ContainerExecCreateSuccess bool ContainerExecAttachSuccess bool ContainerExecInspectSuccess bool ContainerStopSuccess bool ContainerRemoveSuccess bool }
FakeClient Docker mock
func (*FakeClient) ContainerCreate ¶ added in v0.26.0
func (fc *FakeClient) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *specs.Platform, containerName string) (container.ContainerCreateCreatedBody, error)
ContainerCreate mock function
func (*FakeClient) ContainerExecAttach ¶ added in v0.26.0
func (fc *FakeClient) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error)
ContainerExecAttach mock function
func (*FakeClient) ContainerExecCreate ¶ added in v0.26.0
func (fc *FakeClient) ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.IDResponse, error)
ContainerExecCreate mock function
func (*FakeClient) ContainerExecInspect ¶ added in v0.26.0
func (fc *FakeClient) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error)
ContainerExecInspect mock function
func (*FakeClient) ContainerInspect ¶ added in v0.26.0
func (fc *FakeClient) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error)
ContainerInspect mock function
func (*FakeClient) ContainerList ¶ added in v0.26.0
func (fc *FakeClient) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error)
ContainerList mock function
func (*FakeClient) ContainerRemove ¶ added in v0.26.0
func (fc *FakeClient) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error
ContainerRemove mock function
func (*FakeClient) ContainerStart ¶ added in v0.26.0
func (fc *FakeClient) ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error
ContainerStart mock function
func (*FakeClient) ContainerStatPath ¶ added in v0.26.0
func (fc *FakeClient) ContainerStatPath(ctx context.Context, containerID, path string) (types.ContainerPathStat, error)
ContainerStatPath mock function
func (*FakeClient) ContainerStop ¶ added in v0.26.0
func (fc *FakeClient) ContainerStop(ctx context.Context, containerID string, timeout *time.Duration) error
ContainerStop mock function
func (*FakeClient) CopyFromContainer ¶ added in v0.26.0
func (fc *FakeClient) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error)
CopyFromContainer mock function
func (*FakeClient) CopyToContainer ¶ added in v0.26.0
func (fc *FakeClient) CopyToContainer(ctx context.Context, container, path string, content io.Reader, options types.CopyToContainerOptions) error
CopyToContainer mock function
func (*FakeClient) HasBaseImage ¶ added in v0.36.0
HasBaseImage mock function
func (*FakeClient) ImageInspectWithRaw ¶ added in v0.26.0
func (fc *FakeClient) ImageInspectWithRaw(ctx context.Context, imageID string) (types.ImageInspect, []byte, error)
ImageInspectWithRaw mock function
func (*FakeClient) ImageList ¶ added in v0.26.0
func (fc *FakeClient) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error)
ImageList mock function
func (*FakeClient) ImagePull ¶ added in v0.26.0
func (fc *FakeClient) ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error)
ImagePull mock function
func (*FakeClient) ServerVersion ¶ added in v0.26.0
ServerVersion mock function.
type FakeDevicesReader ¶ added in v0.49.0
type FakeDevicesReader struct {
GetDevicesFn func(context.Context, string) ([]devices.Device, error)
}
FakeDevicesReader is a mock for the devices.Reader interface.
func (*FakeDevicesReader) GetDevices ¶ added in v0.49.0
GetDevices is a wrapper around GetDevicesFn.
type FakeEmulatorsReader ¶ added in v0.49.0
type FakeEmulatorsReader struct {
GetVirtualDevicesFn func(context.Context, string) ([]vmd.VirtualDevice, error)
}
FakeEmulatorsReader is a mock for the vmd.Reader interface.
func (*FakeEmulatorsReader) GetVirtualDevices ¶ added in v0.49.0
func (fer *FakeEmulatorsReader) GetVirtualDevices(ctx context.Context, kind string) ([]vmd.VirtualDevice, error)
GetVirtualDevices is a wrapper around GetVirtualDevicesFn.
type FakeFrameworkInfoReader ¶ added in v0.49.0
type FakeFrameworkInfoReader struct { FrameworksFn func(ctx context.Context) ([]framework.Framework, error) VersionsFn func(ctx context.Context, frameworkName string) ([]framework.Metadata, error) SearchFn func(ctx context.Context, opts framework.SearchOptions) (framework.Metadata, error) }
FakeFrameworkInfoReader is a mock for the interface framework.MetadataService.
func (*FakeFrameworkInfoReader) Frameworks ¶ added in v0.49.0
Frameworks is a wrapper around FrameworksFn.
func (*FakeFrameworkInfoReader) Search ¶ added in v0.49.0
func (fir *FakeFrameworkInfoReader) Search(ctx context.Context, opts framework.SearchOptions) (framework.Metadata, error)
Search is wrapper around SearchFn.
type FakeJobReader ¶
type FakeJobReader struct { ReadJobFn func(ctx context.Context, id string) (job.Job, error) PollJobFn func(ctx context.Context, id string, interval time.Duration, timeout time.Duration) (job.Job, error) GetJobAssetFileNamesFn func(ctx context.Context, jobID string) ([]string, error) GetJobAssetFileContentFn func(ctx context.Context, jobID, fileName string) ([]byte, error) }
FakeJobReader resto mock
func (*FakeJobReader) GetJobAssetFileContent ¶
func (fjr *FakeJobReader) GetJobAssetFileContent(ctx context.Context, jobID, fileName string, realDevice bool) ([]byte, error)
GetJobAssetFileContent mock function
func (*FakeJobReader) GetJobAssetFileNames ¶ added in v0.37.0
func (fjr *FakeJobReader) GetJobAssetFileNames(ctx context.Context, jobID string, realDevice bool) ([]string, error)
GetJobAssetFileNames mock function
type FakeJobStarter ¶
type FakeJobStarter struct {
StartJobFn func(ctx context.Context, opts job.StartOptions) (jobID string, isRDC bool, err error)
}
FakeJobStarter resto mock
func (*FakeJobStarter) StartJob ¶
func (fjs *FakeJobStarter) StartJob(ctx context.Context, opts job.StartOptions) (jobID string, isRDC bool, err error)
StartJob mock function
type FakeJobStopper ¶ added in v0.35.0
FakeJobStopper resto mock
type FakeJobWriter ¶ added in v0.37.1
type FakeJobWriter struct {
UploadAssetFn func(jobID string, fileName string, contentType string, content []byte) error
}
FakeJobWriter resto mock
func (*FakeJobWriter) UploadAsset ¶ added in v0.37.1
func (fjw *FakeJobWriter) UploadAsset(jobID string, realDevice bool, fileName string, contentType string, content []byte) error
UploadAsset mock function
type FakeProjectUploader ¶
type FakeProjectUploader struct {
UploadSuccess bool
}
FakeProjectUploader mock struct
func (*FakeProjectUploader) Download ¶ added in v0.107.0
func (fpu *FakeProjectUploader) Download(id string) (io.ReadCloser, int64, error)
func (*FakeProjectUploader) Find ¶ added in v0.46.0
func (fpu *FakeProjectUploader) Find(hash string) (storage.Item, error)
Find mock function
func (*FakeProjectUploader) List ¶ added in v0.107.0
func (fpu *FakeProjectUploader) List(opts storage.ListOptions) (storage.List, error)
func (*FakeProjectUploader) Upload ¶
func (fpu *FakeProjectUploader) Upload(name string) (storage.Item, error)
Upload mock function
func (*FakeProjectUploader) UploadStream ¶ added in v0.107.0
type TestRunner ¶ added in v0.26.0
TestRunner is a mock to test runner functionalities
func (*TestRunner) RunProject ¶ added in v0.26.0
func (r *TestRunner) RunProject() (int, error)
RunProject pretends to run tests defined by config.Project.
func (*TestRunner) Teardown ¶ added in v0.26.0
func (r *TestRunner) Teardown(logDir string) error
Teardown test run