fake

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 14 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 {
	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 *common.ComputeResources, nodes []api.NodeInfo, leasedResourceByQueue map[string]common.ComputeResources) ([]*api.Job, error)

func (*MockLeaseService) ReturnLease

func (ls *MockLeaseService) ReturnLease(pod *v1.Pod) error

type SyncFakeClusterContext

type SyncFakeClusterContext struct {
	Pods map[string]*v1.Pod
}

func NewSyncFakeClusterContext

func NewSyncFakeClusterContext() *SyncFakeClusterContext

func (*SyncFakeClusterContext) AddAnnotation

func (c *SyncFakeClusterContext) AddAnnotation(pod *v1.Pod, annotations map[string]string) error

func (*SyncFakeClusterContext) AddPodEventHandler

func (c *SyncFakeClusterContext) AddPodEventHandler(handler cache.ResourceEventHandlerFuncs)

func (*SyncFakeClusterContext) DeleteIngress added in v0.2.3

func (c *SyncFakeClusterContext) DeleteIngress(ingress *networking.Ingress) error

func (*SyncFakeClusterContext) DeletePods

func (c *SyncFakeClusterContext) DeletePods(pods []*v1.Pod)

func (*SyncFakeClusterContext) DeleteService

func (c *SyncFakeClusterContext) DeleteService(service *v1.Service) error

func (*SyncFakeClusterContext) GetActiveBatchPods

func (c *SyncFakeClusterContext) GetActiveBatchPods() ([]*v1.Pod, error)

func (*SyncFakeClusterContext) GetAllPods

func (c *SyncFakeClusterContext) GetAllPods() ([]*v1.Pod, error)

func (*SyncFakeClusterContext) GetBatchPods

func (c *SyncFakeClusterContext) GetBatchPods() ([]*v1.Pod, error)

func (*SyncFakeClusterContext) GetClusterId

func (c *SyncFakeClusterContext) GetClusterId() string

func (*SyncFakeClusterContext) GetClusterPool

func (c *SyncFakeClusterContext) GetClusterPool() string

func (*SyncFakeClusterContext) GetIngresses added in v0.2.3

func (c *SyncFakeClusterContext) GetIngresses(pod *v1.Pod) ([]*networking.Ingress, error)

func (*SyncFakeClusterContext) GetNodeStatsSummary

func (c *SyncFakeClusterContext) GetNodeStatsSummary(node *v1.Node) (*v1alpha1.Summary, error)

func (*SyncFakeClusterContext) GetNodes

func (c *SyncFakeClusterContext) GetNodes() ([]*v1.Node, error)

func (*SyncFakeClusterContext) GetPodEvents

func (c *SyncFakeClusterContext) GetPodEvents(pod *v1.Pod) ([]*v1.Event, error)

func (*SyncFakeClusterContext) GetServices added in v0.2.3

func (c *SyncFakeClusterContext) GetServices(pod *v1.Pod) ([]*v1.Service, error)

func (*SyncFakeClusterContext) Stop

func (*SyncFakeClusterContext) Stop()

func (*SyncFakeClusterContext) SubmitIngress added in v0.2.3

func (c *SyncFakeClusterContext) SubmitIngress(ingress *networking.Ingress) (*networking.Ingress, error)

func (*SyncFakeClusterContext) SubmitPod

func (c *SyncFakeClusterContext) SubmitPod(pod *v1.Pod, owner string, ownerGroups []string) (*v1.Pod, error)

func (*SyncFakeClusterContext) SubmitService

func (c *SyncFakeClusterContext) SubmitService(service *v1.Service) (*v1.Service, error)

Jump to

Keyboard shortcuts

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