mocks

package
v0.190.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

func (fdr *FakeDevicesReader) GetDevices(ctx context.Context, OS string) ([]devices.Device, error)

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) ([]string, error)
	VersionsFn   func(ctx context.Context, frameworkName string) ([]framework.Metadata, error)
	RuntimeFn    func(ctx context.Context) ([]runtime.Runtime, error)
}

FakeFrameworkInfoReader is a mock for the interface framework.MetadataService.

func (*FakeFrameworkInfoReader) Frameworks added in v0.49.0

func (fir *FakeFrameworkInfoReader) Frameworks(ctx context.Context) ([]string, error)

Frameworks is a wrapper around FrameworksFn.

func (*FakeFrameworkInfoReader) Runtimes added in v0.185.0

func (fir *FakeFrameworkInfoReader) Runtimes(ctx context.Context) ([]runtime.Runtime, error)

Runtimes is a wrapper around RuntimesFn.

func (*FakeFrameworkInfoReader) Versions added in v0.49.0

func (fir *FakeFrameworkInfoReader) Versions(ctx context.Context, frameworkName string) ([]framework.Metadata, error)

Versions is a wrapper around VersionsFn.

type FakeJobService added in v0.186.4

type FakeJobService struct {
	StartJobFn func(ctx context.Context, opts job.StartOptions) (job.Job, error)
	StopJobFn  func(ctx context.Context, jobID string, realDevice bool) (job.Job, error)
	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)

	UploadAssetFn            func(ctx context.Context, jobID string, realDevice bool, fileName string, contentType string, content []byte) error
	DownloadArtifactFn       func(job job.Job, isLastAttempt bool) []string
	GetJobAssetFileNamesFn   func(ctx context.Context, jobID string) ([]string, error)
	GetJobAssetFileContentFn func(ctx context.Context, jobID, fileName string) ([]byte, error)
}

FakeJobService resto mock

func (*FakeJobService) Artifact added in v0.186.4

func (s *FakeJobService) Artifact(
	ctx context.Context, jobID, fileName string, _ bool,
) ([]byte, error)

Artifact mock function

func (*FakeJobService) ArtifactNames added in v0.186.4

func (s *FakeJobService) ArtifactNames(
	ctx context.Context, jobID string, _ bool,
) ([]string, error)

ArtifactNames mock function

func (*FakeJobService) DownloadArtifacts added in v0.186.4

func (s *FakeJobService) DownloadArtifacts(
	job job.Job, isLastAttempt bool,
) []string

func (*FakeJobService) Job added in v0.186.4

func (s *FakeJobService) Job(
	ctx context.Context, id string, _ bool,
) (job.Job, error)

Job mock function

func (*FakeJobService) PollJob added in v0.186.4

func (s *FakeJobService) PollJob(
	ctx context.Context, id string, interval, timeout time.Duration, _ bool,
) (job.Job, error)

PollJob mock function

func (*FakeJobService) StartJob added in v0.186.4

func (s *FakeJobService) StartJob(ctx context.Context, opts job.StartOptions) (job.Job, error)

func (*FakeJobService) StopJob added in v0.186.4

func (s *FakeJobService) StopJob(
	ctx context.Context, jobID string, realDevice bool,
) (job.Job, error)

func (*FakeJobService) UploadArtifact added in v0.186.4

func (s *FakeJobService) UploadArtifact(ctx context.Context, jobID string, realDevice bool, fileName string, contentType string, content []byte) error

type UserService added in v0.126.0

type UserService struct {
	UserFn        func(ctx context.Context) (iam.User, error)
	ConcurrencyFn func(ctx context.Context) (iam.Concurrency, error)
}

func (*UserService) Concurrency added in v0.126.0

func (s *UserService) Concurrency(ctx context.Context) (iam.Concurrency, error)

func (*UserService) User added in v0.126.0

func (s *UserService) User(ctx context.Context) (iam.User, error)

Jump to

Keyboard shortcuts

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