mockscheduler

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	mock.Mock
}

Executor is an autogenerated mock type for the Executor type

func NewExecutor

func NewExecutor(t interface {
	mock.TestingT
	Cleanup(func())
}) *Executor

NewExecutor creates a new instance of Executor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Executor) EXPECT

func (_m *Executor) EXPECT() *Executor_Expecter

func (*Executor) ExecAs

func (_m *Executor) ExecAs(ctx context.Context, user string, cmd string) (string, error)

ExecAs provides a mock function with given fields: ctx, user, cmd

type Executor_ExecAs_Call

type Executor_ExecAs_Call struct {
	*mock.Call
}

Executor_ExecAs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecAs'

func (*Executor_ExecAs_Call) Return

func (_c *Executor_ExecAs_Call) Return(_a0 string, _a1 error) *Executor_ExecAs_Call

func (*Executor_ExecAs_Call) Run

func (_c *Executor_ExecAs_Call) Run(run func(ctx context.Context, user string, cmd string)) *Executor_ExecAs_Call

func (*Executor_ExecAs_Call) RunAndReturn

type Executor_Expecter

type Executor_Expecter struct {
	// contains filtered or unexported fields
}

func (*Executor_Expecter) ExecAs

func (_e *Executor_Expecter) ExecAs(ctx interface{}, user interface{}, cmd interface{}) *Executor_ExecAs_Call

ExecAs is a helper method to define mock.On call

  • ctx context.Context
  • user string
  • cmd string

type Scheduler

type Scheduler struct {
	mock.Mock
}

Scheduler is an autogenerated mock type for the Scheduler type

func NewScheduler

func NewScheduler(t interface {
	mock.TestingT
	Cleanup(func())
}) *Scheduler

NewScheduler creates a new instance of Scheduler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Scheduler) CancelJob

func (_m *Scheduler) CancelJob(ctx context.Context, name string, user string) error

CancelJob provides a mock function with given fields: ctx, name, user

func (*Scheduler) EXPECT

func (_m *Scheduler) EXPECT() *Scheduler_Expecter

func (*Scheduler) FindCPUsPerNode

func (_m *Scheduler) FindCPUsPerNode(ctx context.Context, opts ...scheduler.FindSpecOption) ([]uint64, error)

FindCPUsPerNode provides a mock function with given fields: ctx, opts

func (*Scheduler) FindGPUsPerNode

func (_m *Scheduler) FindGPUsPerNode(ctx context.Context, opts ...scheduler.FindSpecOption) ([]uint64, error)

FindGPUsPerNode provides a mock function with given fields: ctx, opts

func (*Scheduler) FindMemPerNode

func (_m *Scheduler) FindMemPerNode(ctx context.Context, opts ...scheduler.FindSpecOption) ([]uint64, error)

FindMemPerNode provides a mock function with given fields: ctx, opts

func (*Scheduler) FindRunningJobByName

func (_m *Scheduler) FindRunningJobByName(ctx context.Context, name string, user string) (int, error)

FindRunningJobByName provides a mock function with given fields: ctx, name, user

func (*Scheduler) FindTotalCPUs

func (_m *Scheduler) FindTotalCPUs(ctx context.Context) (uint64, error)

FindTotalCPUs provides a mock function with given fields: ctx

func (*Scheduler) FindTotalGPUs

func (_m *Scheduler) FindTotalGPUs(ctx context.Context) (uint64, error)

FindTotalGPUs provides a mock function with given fields: ctx

func (*Scheduler) FindTotalMem

func (_m *Scheduler) FindTotalMem(ctx context.Context) (uint64, error)

FindTotalMem provides a mock function with given fields: ctx

func (*Scheduler) FindTotalNodes

func (_m *Scheduler) FindTotalNodes(ctx context.Context, opts ...scheduler.FindSpecOption) (uint64, error)

FindTotalNodes provides a mock function with given fields: ctx, opts

func (*Scheduler) HealthCheck

func (_m *Scheduler) HealthCheck(ctx context.Context) error

HealthCheck provides a mock function with given fields: ctx

func (*Scheduler) Submit

func (_m *Scheduler) Submit(ctx context.Context, req *scheduler.SubmitRequest) (string, error)

Submit provides a mock function with given fields: ctx, req

func (*Scheduler) TopUp

func (_m *Scheduler) TopUp(ctx context.Context, name string, additionalTime uint64) error

TopUp provides a mock function with given fields: ctx, name, additionalTime

type Scheduler_CancelJob_Call

type Scheduler_CancelJob_Call struct {
	*mock.Call
}

Scheduler_CancelJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelJob'

func (*Scheduler_CancelJob_Call) Return

func (*Scheduler_CancelJob_Call) Run

func (_c *Scheduler_CancelJob_Call) Run(run func(ctx context.Context, name string, user string)) *Scheduler_CancelJob_Call

func (*Scheduler_CancelJob_Call) RunAndReturn

type Scheduler_Expecter

type Scheduler_Expecter struct {
	// contains filtered or unexported fields
}

func (*Scheduler_Expecter) CancelJob

func (_e *Scheduler_Expecter) CancelJob(ctx interface{}, name interface{}, user interface{}) *Scheduler_CancelJob_Call

CancelJob is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • user string

func (*Scheduler_Expecter) FindCPUsPerNode

func (_e *Scheduler_Expecter) FindCPUsPerNode(ctx interface{}, opts ...interface{}) *Scheduler_FindCPUsPerNode_Call

FindCPUsPerNode is a helper method to define mock.On call

  • ctx context.Context
  • opts ...scheduler.FindSpecOption

func (*Scheduler_Expecter) FindGPUsPerNode

func (_e *Scheduler_Expecter) FindGPUsPerNode(ctx interface{}, opts ...interface{}) *Scheduler_FindGPUsPerNode_Call

FindGPUsPerNode is a helper method to define mock.On call

  • ctx context.Context
  • opts ...scheduler.FindSpecOption

func (*Scheduler_Expecter) FindMemPerNode

func (_e *Scheduler_Expecter) FindMemPerNode(ctx interface{}, opts ...interface{}) *Scheduler_FindMemPerNode_Call

FindMemPerNode is a helper method to define mock.On call

  • ctx context.Context
  • opts ...scheduler.FindSpecOption

func (*Scheduler_Expecter) FindRunningJobByName

func (_e *Scheduler_Expecter) FindRunningJobByName(ctx interface{}, name interface{}, user interface{}) *Scheduler_FindRunningJobByName_Call

FindRunningJobByName is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • user string

func (*Scheduler_Expecter) FindTotalCPUs

func (_e *Scheduler_Expecter) FindTotalCPUs(ctx interface{}) *Scheduler_FindTotalCPUs_Call

FindTotalCPUs is a helper method to define mock.On call

  • ctx context.Context

func (*Scheduler_Expecter) FindTotalGPUs

func (_e *Scheduler_Expecter) FindTotalGPUs(ctx interface{}) *Scheduler_FindTotalGPUs_Call

FindTotalGPUs is a helper method to define mock.On call

  • ctx context.Context

func (*Scheduler_Expecter) FindTotalMem

func (_e *Scheduler_Expecter) FindTotalMem(ctx interface{}) *Scheduler_FindTotalMem_Call

FindTotalMem is a helper method to define mock.On call

  • ctx context.Context

func (*Scheduler_Expecter) FindTotalNodes

func (_e *Scheduler_Expecter) FindTotalNodes(ctx interface{}, opts ...interface{}) *Scheduler_FindTotalNodes_Call

FindTotalNodes is a helper method to define mock.On call

  • ctx context.Context
  • opts ...scheduler.FindSpecOption

func (*Scheduler_Expecter) HealthCheck

func (_e *Scheduler_Expecter) HealthCheck(ctx interface{}) *Scheduler_HealthCheck_Call

HealthCheck is a helper method to define mock.On call

  • ctx context.Context

func (*Scheduler_Expecter) Submit

func (_e *Scheduler_Expecter) Submit(ctx interface{}, req interface{}) *Scheduler_Submit_Call

Submit is a helper method to define mock.On call

  • ctx context.Context
  • req *scheduler.SubmitRequest

func (*Scheduler_Expecter) TopUp

func (_e *Scheduler_Expecter) TopUp(ctx interface{}, name interface{}, additionalTime interface{}) *Scheduler_TopUp_Call

TopUp is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • additionalTime uint64

type Scheduler_FindCPUsPerNode_Call

type Scheduler_FindCPUsPerNode_Call struct {
	*mock.Call
}

Scheduler_FindCPUsPerNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindCPUsPerNode'

func (*Scheduler_FindCPUsPerNode_Call) Return

func (*Scheduler_FindCPUsPerNode_Call) Run

func (*Scheduler_FindCPUsPerNode_Call) RunAndReturn

type Scheduler_FindGPUsPerNode_Call

type Scheduler_FindGPUsPerNode_Call struct {
	*mock.Call
}

Scheduler_FindGPUsPerNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindGPUsPerNode'

func (*Scheduler_FindGPUsPerNode_Call) Return

func (*Scheduler_FindGPUsPerNode_Call) Run

func (*Scheduler_FindGPUsPerNode_Call) RunAndReturn

type Scheduler_FindMemPerNode_Call

type Scheduler_FindMemPerNode_Call struct {
	*mock.Call
}

Scheduler_FindMemPerNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindMemPerNode'

func (*Scheduler_FindMemPerNode_Call) Return

func (*Scheduler_FindMemPerNode_Call) Run

func (*Scheduler_FindMemPerNode_Call) RunAndReturn

type Scheduler_FindRunningJobByName_Call

type Scheduler_FindRunningJobByName_Call struct {
	*mock.Call
}

Scheduler_FindRunningJobByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindRunningJobByName'

func (*Scheduler_FindRunningJobByName_Call) Return

func (*Scheduler_FindRunningJobByName_Call) Run

func (*Scheduler_FindRunningJobByName_Call) RunAndReturn

type Scheduler_FindTotalCPUs_Call

type Scheduler_FindTotalCPUs_Call struct {
	*mock.Call
}

Scheduler_FindTotalCPUs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTotalCPUs'

func (*Scheduler_FindTotalCPUs_Call) Return

func (*Scheduler_FindTotalCPUs_Call) Run

func (*Scheduler_FindTotalCPUs_Call) RunAndReturn

type Scheduler_FindTotalGPUs_Call

type Scheduler_FindTotalGPUs_Call struct {
	*mock.Call
}

Scheduler_FindTotalGPUs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTotalGPUs'

func (*Scheduler_FindTotalGPUs_Call) Return

func (*Scheduler_FindTotalGPUs_Call) Run

func (*Scheduler_FindTotalGPUs_Call) RunAndReturn

type Scheduler_FindTotalMem_Call

type Scheduler_FindTotalMem_Call struct {
	*mock.Call
}

Scheduler_FindTotalMem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTotalMem'

func (*Scheduler_FindTotalMem_Call) Return

func (*Scheduler_FindTotalMem_Call) Run

func (*Scheduler_FindTotalMem_Call) RunAndReturn

type Scheduler_FindTotalNodes_Call

type Scheduler_FindTotalNodes_Call struct {
	*mock.Call
}

Scheduler_FindTotalNodes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTotalNodes'

func (*Scheduler_FindTotalNodes_Call) Return

func (*Scheduler_FindTotalNodes_Call) Run

func (*Scheduler_FindTotalNodes_Call) RunAndReturn

type Scheduler_HealthCheck_Call

type Scheduler_HealthCheck_Call struct {
	*mock.Call
}

Scheduler_HealthCheck_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthCheck'

func (*Scheduler_HealthCheck_Call) Return

func (*Scheduler_HealthCheck_Call) Run

func (*Scheduler_HealthCheck_Call) RunAndReturn

type Scheduler_Submit_Call

type Scheduler_Submit_Call struct {
	*mock.Call
}

Scheduler_Submit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Submit'

func (*Scheduler_Submit_Call) Return

func (*Scheduler_Submit_Call) Run

func (*Scheduler_Submit_Call) RunAndReturn

type Scheduler_TopUp_Call

type Scheduler_TopUp_Call struct {
	*mock.Call
}

Scheduler_TopUp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TopUp'

func (*Scheduler_TopUp_Call) Return

func (*Scheduler_TopUp_Call) Run

func (_c *Scheduler_TopUp_Call) Run(run func(ctx context.Context, name string, additionalTime uint64)) *Scheduler_TopUp_Call

func (*Scheduler_TopUp_Call) RunAndReturn

Jump to

Keyboard shortcuts

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