mocks

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockService

type MockService struct {
	mock.Mock
}

MockService is an autogenerated mock type for the Service type

func NewMockService

func NewMockService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockService

NewMockService creates a new instance of MockService. 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 (*MockService) CreateWorkload

func (_m *MockService) CreateWorkload(ctx context.Context, namespaceName string, w *v1alpha1.Workload) (*v1alpha1.Workload, error)

CreateWorkload provides a mock function with given fields: ctx, namespaceName, w

func (*MockService) DeleteWorkload

func (_m *MockService) DeleteWorkload(ctx context.Context, namespaceName string, workloadName string) error

DeleteWorkload provides a mock function with given fields: ctx, namespaceName, workloadName

func (*MockService) EXPECT

func (_m *MockService) EXPECT() *MockService_Expecter

func (*MockService) GetWorkload

func (_m *MockService) GetWorkload(ctx context.Context, namespaceName string, workloadName string) (*v1alpha1.Workload, error)

GetWorkload provides a mock function with given fields: ctx, namespaceName, workloadName

func (*MockService) GetWorkloadSchema

func (_m *MockService) GetWorkloadSchema(ctx context.Context) (*v1.JSONSchemaProps, error)

GetWorkloadSchema provides a mock function with given fields: ctx

func (*MockService) ListWorkloads

func (_m *MockService) ListWorkloads(ctx context.Context, namespaceName string, componentName string, opts services.ListOptions) (*services.ListResult[v1alpha1.Workload], error)

ListWorkloads provides a mock function with given fields: ctx, namespaceName, componentName, opts

func (*MockService) UpdateWorkload

func (_m *MockService) UpdateWorkload(ctx context.Context, namespaceName string, w *v1alpha1.Workload) (*v1alpha1.Workload, error)

UpdateWorkload provides a mock function with given fields: ctx, namespaceName, w

type MockService_CreateWorkload_Call

type MockService_CreateWorkload_Call struct {
	*mock.Call
}

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

func (*MockService_CreateWorkload_Call) Return

func (*MockService_CreateWorkload_Call) Run

func (*MockService_CreateWorkload_Call) RunAndReturn

type MockService_DeleteWorkload_Call

type MockService_DeleteWorkload_Call struct {
	*mock.Call
}

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

func (*MockService_DeleteWorkload_Call) Return

func (*MockService_DeleteWorkload_Call) Run

func (_c *MockService_DeleteWorkload_Call) Run(run func(ctx context.Context, namespaceName string, workloadName string)) *MockService_DeleteWorkload_Call

func (*MockService_DeleteWorkload_Call) RunAndReturn

type MockService_Expecter

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

func (*MockService_Expecter) CreateWorkload

func (_e *MockService_Expecter) CreateWorkload(ctx interface{}, namespaceName interface{}, w interface{}) *MockService_CreateWorkload_Call

CreateWorkload is a helper method to define mock.On call

  • ctx context.Context
  • namespaceName string
  • w *v1alpha1.Workload

func (*MockService_Expecter) DeleteWorkload

func (_e *MockService_Expecter) DeleteWorkload(ctx interface{}, namespaceName interface{}, workloadName interface{}) *MockService_DeleteWorkload_Call

DeleteWorkload is a helper method to define mock.On call

  • ctx context.Context
  • namespaceName string
  • workloadName string

func (*MockService_Expecter) GetWorkload

func (_e *MockService_Expecter) GetWorkload(ctx interface{}, namespaceName interface{}, workloadName interface{}) *MockService_GetWorkload_Call

GetWorkload is a helper method to define mock.On call

  • ctx context.Context
  • namespaceName string
  • workloadName string

func (*MockService_Expecter) GetWorkloadSchema

func (_e *MockService_Expecter) GetWorkloadSchema(ctx interface{}) *MockService_GetWorkloadSchema_Call

GetWorkloadSchema is a helper method to define mock.On call

  • ctx context.Context

func (*MockService_Expecter) ListWorkloads

func (_e *MockService_Expecter) ListWorkloads(ctx interface{}, namespaceName interface{}, componentName interface{}, opts interface{}) *MockService_ListWorkloads_Call

ListWorkloads is a helper method to define mock.On call

  • ctx context.Context
  • namespaceName string
  • componentName string
  • opts services.ListOptions

func (*MockService_Expecter) UpdateWorkload

func (_e *MockService_Expecter) UpdateWorkload(ctx interface{}, namespaceName interface{}, w interface{}) *MockService_UpdateWorkload_Call

UpdateWorkload is a helper method to define mock.On call

  • ctx context.Context
  • namespaceName string
  • w *v1alpha1.Workload

type MockService_GetWorkloadSchema_Call

type MockService_GetWorkloadSchema_Call struct {
	*mock.Call
}

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

func (*MockService_GetWorkloadSchema_Call) Return

func (*MockService_GetWorkloadSchema_Call) Run

func (*MockService_GetWorkloadSchema_Call) RunAndReturn

type MockService_GetWorkload_Call

type MockService_GetWorkload_Call struct {
	*mock.Call
}

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

func (*MockService_GetWorkload_Call) Return

func (*MockService_GetWorkload_Call) Run

func (_c *MockService_GetWorkload_Call) Run(run func(ctx context.Context, namespaceName string, workloadName string)) *MockService_GetWorkload_Call

func (*MockService_GetWorkload_Call) RunAndReturn

type MockService_ListWorkloads_Call

type MockService_ListWorkloads_Call struct {
	*mock.Call
}

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

func (*MockService_ListWorkloads_Call) Return

func (*MockService_ListWorkloads_Call) Run

func (_c *MockService_ListWorkloads_Call) Run(run func(ctx context.Context, namespaceName string, componentName string, opts services.ListOptions)) *MockService_ListWorkloads_Call

type MockService_UpdateWorkload_Call

type MockService_UpdateWorkload_Call struct {
	*mock.Call
}

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

func (*MockService_UpdateWorkload_Call) Return

func (*MockService_UpdateWorkload_Call) Run

func (*MockService_UpdateWorkload_Call) RunAndReturn

Jump to

Keyboard shortcuts

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