mocks

package
v0.3.77 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockLeaseService

type MockLeaseService struct {
	NonrenewableJobIds    []string
	ReturnLeaseCalls      int
	RequestJobLeasesCalls int
	ReportDoneCalls       int

	ReturnLeaseArg *v1.Pod
	ReportDoneArg  []string
}

func NewMockLeaseService

func NewMockLeaseService() *MockLeaseService

func (*MockLeaseService) AssertReportDoneCalledOnceWith

func (ls *MockLeaseService) AssertReportDoneCalledOnceWith(t *testing.T, expected []string)

func (*MockLeaseService) RenewJobLeases

func (ls *MockLeaseService) RenewJobLeases(jobs []*job.RunningJob) ([]*job.RunningJob, error)

func (*MockLeaseService) ReportDone

func (ls *MockLeaseService) ReportDone(jobIds []string) error

func (*MockLeaseService) RequestJobLeases

func (ls *MockLeaseService) RequestJobLeases(
	availableResource *armadaresource.ComputeResources,
	nodes []api.NodeInfo,
	leasedResourceByQueue map[string]armadaresource.ComputeResources,
	leasedResourceByQueueAndPriority map[string]map[int32]armadaresource.ComputeResources,
) ([]*api.Job, error)

func (*MockLeaseService) ReturnLease

func (ls *MockLeaseService) ReturnLease(pod *v1.Pod, reason string, jobRunAttempted bool) error

Jump to

Keyboard shortcuts

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