kubectl

package
v1.27.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package kubectl provides auto-generated mocks for the kubectl.Backend interface. This package should only be imported in test files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockBackend

type MockBackend struct {
	mock.Mock
}

MockBackend is an autogenerated mock type for the Backend type

func NewMockBackend

func NewMockBackend(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBackend

NewMockBackend creates a new instance of MockBackend. 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 (*MockBackend) Apply

func (_mock *MockBackend) Apply(ctx context.Context, jsonData []byte, namespace string) error

Apply provides a mock function for the type MockBackend

func (*MockBackend) Delete

func (_mock *MockBackend) Delete(ctx context.Context, resourceType string, name string, namespace string) error

Delete provides a mock function for the type MockBackend

func (*MockBackend) DeletePodsByLabel

func (_mock *MockBackend) DeletePodsByLabel(ctx context.Context, namespace string, labelSelector string) (int, error)

DeletePodsByLabel provides a mock function for the type MockBackend

func (*MockBackend) EXPECT

func (_m *MockBackend) EXPECT() *MockBackend_Expecter

func (*MockBackend) Get

func (_mock *MockBackend) Get(ctx context.Context, resourceType string, name string, namespace string) (string, error)

Get provides a mock function for the type MockBackend

func (*MockBackend) GetVersion

func (_mock *MockBackend) GetVersion(ctx context.Context) (*kubectl.VersionResponse, error)

GetVersion provides a mock function for the type MockBackend

func (*MockBackend) Scale

func (_mock *MockBackend) Scale(ctx context.Context, resourceType string, name string, namespace string, replicas int) error

Scale provides a mock function for the type MockBackend

func (*MockBackend) Wait

func (_mock *MockBackend) Wait(ctx context.Context, resourceType string, name string, namespace string, condition string, timeout string) error

Wait provides a mock function for the type MockBackend

type MockBackend_Apply_Call

type MockBackend_Apply_Call struct {
	*mock.Call
}

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

func (*MockBackend_Apply_Call) Return

func (*MockBackend_Apply_Call) Run

func (_c *MockBackend_Apply_Call) Run(run func(ctx context.Context, jsonData []byte, namespace string)) *MockBackend_Apply_Call

func (*MockBackend_Apply_Call) RunAndReturn

func (_c *MockBackend_Apply_Call) RunAndReturn(run func(ctx context.Context, jsonData []byte, namespace string) error) *MockBackend_Apply_Call

type MockBackend_DeletePodsByLabel_Call

type MockBackend_DeletePodsByLabel_Call struct {
	*mock.Call
}

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

func (*MockBackend_DeletePodsByLabel_Call) Return

func (*MockBackend_DeletePodsByLabel_Call) Run

func (_c *MockBackend_DeletePodsByLabel_Call) Run(run func(ctx context.Context, namespace string, labelSelector string)) *MockBackend_DeletePodsByLabel_Call

func (*MockBackend_DeletePodsByLabel_Call) RunAndReturn

func (_c *MockBackend_DeletePodsByLabel_Call) RunAndReturn(run func(ctx context.Context, namespace string, labelSelector string) (int, error)) *MockBackend_DeletePodsByLabel_Call

type MockBackend_Delete_Call

type MockBackend_Delete_Call struct {
	*mock.Call
}

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

func (*MockBackend_Delete_Call) Return

func (*MockBackend_Delete_Call) Run

func (_c *MockBackend_Delete_Call) Run(run func(ctx context.Context, resourceType string, name string, namespace string)) *MockBackend_Delete_Call

func (*MockBackend_Delete_Call) RunAndReturn

func (_c *MockBackend_Delete_Call) RunAndReturn(run func(ctx context.Context, resourceType string, name string, namespace string) error) *MockBackend_Delete_Call

type MockBackend_Expecter

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

func (*MockBackend_Expecter) Apply

func (_e *MockBackend_Expecter) Apply(ctx interface{}, jsonData interface{}, namespace interface{}) *MockBackend_Apply_Call

Apply is a helper method to define mock.On call

  • ctx context.Context
  • jsonData []byte
  • namespace string

func (*MockBackend_Expecter) Delete

func (_e *MockBackend_Expecter) Delete(ctx interface{}, resourceType interface{}, name interface{}, namespace interface{}) *MockBackend_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • resourceType string
  • name string
  • namespace string

func (*MockBackend_Expecter) DeletePodsByLabel

func (_e *MockBackend_Expecter) DeletePodsByLabel(ctx interface{}, namespace interface{}, labelSelector interface{}) *MockBackend_DeletePodsByLabel_Call

DeletePodsByLabel is a helper method to define mock.On call

  • ctx context.Context
  • namespace string
  • labelSelector string

func (*MockBackend_Expecter) Get

func (_e *MockBackend_Expecter) Get(ctx interface{}, resourceType interface{}, name interface{}, namespace interface{}) *MockBackend_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • resourceType string
  • name string
  • namespace string

func (*MockBackend_Expecter) GetVersion

func (_e *MockBackend_Expecter) GetVersion(ctx interface{}) *MockBackend_GetVersion_Call

GetVersion is a helper method to define mock.On call

  • ctx context.Context

func (*MockBackend_Expecter) Scale

func (_e *MockBackend_Expecter) Scale(ctx interface{}, resourceType interface{}, name interface{}, namespace interface{}, replicas interface{}) *MockBackend_Scale_Call

Scale is a helper method to define mock.On call

  • ctx context.Context
  • resourceType string
  • name string
  • namespace string
  • replicas int

func (*MockBackend_Expecter) Wait

func (_e *MockBackend_Expecter) Wait(ctx interface{}, resourceType interface{}, name interface{}, namespace interface{}, condition interface{}, timeout interface{}) *MockBackend_Wait_Call

Wait is a helper method to define mock.On call

  • ctx context.Context
  • resourceType string
  • name string
  • namespace string
  • condition string
  • timeout string

type MockBackend_GetVersion_Call

type MockBackend_GetVersion_Call struct {
	*mock.Call
}

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

func (*MockBackend_GetVersion_Call) Return

func (*MockBackend_GetVersion_Call) Run

func (*MockBackend_GetVersion_Call) RunAndReturn

type MockBackend_Get_Call

type MockBackend_Get_Call struct {
	*mock.Call
}

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

func (*MockBackend_Get_Call) Return

func (*MockBackend_Get_Call) Run

func (_c *MockBackend_Get_Call) Run(run func(ctx context.Context, resourceType string, name string, namespace string)) *MockBackend_Get_Call

func (*MockBackend_Get_Call) RunAndReturn

func (_c *MockBackend_Get_Call) RunAndReturn(run func(ctx context.Context, resourceType string, name string, namespace string) (string, error)) *MockBackend_Get_Call

type MockBackend_Scale_Call

type MockBackend_Scale_Call struct {
	*mock.Call
}

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

func (*MockBackend_Scale_Call) Return

func (*MockBackend_Scale_Call) Run

func (_c *MockBackend_Scale_Call) Run(run func(ctx context.Context, resourceType string, name string, namespace string, replicas int)) *MockBackend_Scale_Call

func (*MockBackend_Scale_Call) RunAndReturn

func (_c *MockBackend_Scale_Call) RunAndReturn(run func(ctx context.Context, resourceType string, name string, namespace string, replicas int) error) *MockBackend_Scale_Call

type MockBackend_Wait_Call

type MockBackend_Wait_Call struct {
	*mock.Call
}

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

func (*MockBackend_Wait_Call) Return

func (*MockBackend_Wait_Call) Run

func (_c *MockBackend_Wait_Call) Run(run func(ctx context.Context, resourceType string, name string, namespace string, condition string, timeout string)) *MockBackend_Wait_Call

func (*MockBackend_Wait_Call) RunAndReturn

func (_c *MockBackend_Wait_Call) RunAndReturn(run func(ctx context.Context, resourceType string, name string, namespace string, condition string, timeout string) error) *MockBackend_Wait_Call

Jump to

Keyboard shortcuts

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