Documentation
¶
Overview ¶
Package kubectl provides auto-generated mocks for the kubectl.Backend interface. This package should only be imported in test files.
Index ¶
- type MockBackend
- func (_mock *MockBackend) Apply(ctx context.Context, jsonData []byte, namespace string) error
- func (_mock *MockBackend) Delete(ctx context.Context, resourceType string, name string, namespace string) error
- func (_mock *MockBackend) DeletePodsByLabel(ctx context.Context, namespace string, labelSelector string) (int, error)
- func (_m *MockBackend) EXPECT() *MockBackend_Expecter
- func (_mock *MockBackend) Get(ctx context.Context, resourceType string, name string, namespace string) (string, error)
- func (_mock *MockBackend) GetVersion(ctx context.Context) (*kubectl.VersionResponse, error)
- func (_mock *MockBackend) Scale(ctx context.Context, resourceType string, name string, namespace string, ...) error
- func (_mock *MockBackend) Wait(ctx context.Context, resourceType string, name string, namespace string, ...) error
- type MockBackend_Apply_Call
- func (_c *MockBackend_Apply_Call) Return(err error) *MockBackend_Apply_Call
- func (_c *MockBackend_Apply_Call) Run(run func(ctx context.Context, jsonData []byte, namespace string)) *MockBackend_Apply_Call
- func (_c *MockBackend_Apply_Call) RunAndReturn(run func(ctx context.Context, jsonData []byte, namespace string) error) *MockBackend_Apply_Call
- type MockBackend_DeletePodsByLabel_Call
- func (_c *MockBackend_DeletePodsByLabel_Call) Return(n int, err error) *MockBackend_DeletePodsByLabel_Call
- func (_c *MockBackend_DeletePodsByLabel_Call) Run(run func(ctx context.Context, namespace string, labelSelector string)) *MockBackend_DeletePodsByLabel_Call
- func (_c *MockBackend_DeletePodsByLabel_Call) RunAndReturn(...) *MockBackend_DeletePodsByLabel_Call
- type MockBackend_Delete_Call
- type MockBackend_Expecter
- func (_e *MockBackend_Expecter) Apply(ctx interface{}, jsonData interface{}, namespace interface{}) *MockBackend_Apply_Call
- func (_e *MockBackend_Expecter) Delete(ctx interface{}, resourceType interface{}, name interface{}, ...) *MockBackend_Delete_Call
- func (_e *MockBackend_Expecter) DeletePodsByLabel(ctx interface{}, namespace interface{}, labelSelector interface{}) *MockBackend_DeletePodsByLabel_Call
- func (_e *MockBackend_Expecter) Get(ctx interface{}, resourceType interface{}, name interface{}, ...) *MockBackend_Get_Call
- func (_e *MockBackend_Expecter) GetVersion(ctx interface{}) *MockBackend_GetVersion_Call
- func (_e *MockBackend_Expecter) Scale(ctx interface{}, resourceType interface{}, name interface{}, ...) *MockBackend_Scale_Call
- func (_e *MockBackend_Expecter) Wait(ctx interface{}, resourceType interface{}, name interface{}, ...) *MockBackend_Wait_Call
- type MockBackend_GetVersion_Call
- func (_c *MockBackend_GetVersion_Call) Return(versionResponse *kubectl.VersionResponse, err error) *MockBackend_GetVersion_Call
- func (_c *MockBackend_GetVersion_Call) Run(run func(ctx context.Context)) *MockBackend_GetVersion_Call
- func (_c *MockBackend_GetVersion_Call) RunAndReturn(run func(ctx context.Context) (*kubectl.VersionResponse, error)) *MockBackend_GetVersion_Call
- type MockBackend_Get_Call
- type MockBackend_Scale_Call
- type MockBackend_Wait_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockBackend ¶
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) 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
type MockBackend_Apply_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 (_c *MockBackend_Apply_Call) Return(err error) *MockBackend_Apply_Call
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 ¶
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 (_c *MockBackend_DeletePodsByLabel_Call) Return(n int, err error) *MockBackend_DeletePodsByLabel_Call
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 ¶
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 (_c *MockBackend_Delete_Call) Return(err error) *MockBackend_Delete_Call
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 ¶
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 (_c *MockBackend_GetVersion_Call) Return(versionResponse *kubectl.VersionResponse, err error) *MockBackend_GetVersion_Call
func (*MockBackend_GetVersion_Call) Run ¶
func (_c *MockBackend_GetVersion_Call) Run(run func(ctx context.Context)) *MockBackend_GetVersion_Call
func (*MockBackend_GetVersion_Call) RunAndReturn ¶
func (_c *MockBackend_GetVersion_Call) RunAndReturn(run func(ctx context.Context) (*kubectl.VersionResponse, error)) *MockBackend_GetVersion_Call
type MockBackend_Get_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 (_c *MockBackend_Get_Call) Return(s string, err error) *MockBackend_Get_Call
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 ¶
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 (_c *MockBackend_Scale_Call) Return(err error) *MockBackend_Scale_Call
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 ¶
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 (_c *MockBackend_Wait_Call) Return(err error) *MockBackend_Wait_Call
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