Documentation ¶
Overview ¶
Package testUtils is a generated GoMock package.
Index ¶
- type MockSdkOperations
- func (m *MockSdkOperations) Create(o runtime.Object) error
- func (m *MockSdkOperations) Delete(o runtime.Object, opts ...interface{}) error
- func (m *MockSdkOperations) EXPECT() *MockSdkOperationsMockRecorder
- func (m *MockSdkOperations) Get(o runtime.Object) error
- func (m *MockSdkOperations) List(namespace string, o runtime.Object) error
- func (m *MockSdkOperations) Update(o runtime.Object) error
- func (m *MockSdkOperations) WithDeleteOptions(metaDeleteOptions *v1.DeleteOptions) interface{}
- type MockSdkOperationsMockRecorder
- func (mr *MockSdkOperationsMockRecorder) Create(o interface{}) *gomock.Call
- func (mr *MockSdkOperationsMockRecorder) Delete(o interface{}, opts ...interface{}) *gomock.Call
- func (mr *MockSdkOperationsMockRecorder) Get(o interface{}) *gomock.Call
- func (mr *MockSdkOperationsMockRecorder) List(namespace, o interface{}) *gomock.Call
- func (mr *MockSdkOperationsMockRecorder) Update(o interface{}) *gomock.Call
- func (mr *MockSdkOperationsMockRecorder) WithDeleteOptions(metaDeleteOptions interface{}) *gomock.Call
- type SdkMockStateful
- func (m *SdkMockStateful) Create(o runtime.Object) error
- func (m *SdkMockStateful) Delete(o runtime.Object, opts ...interface{}) error
- func (m *SdkMockStateful) Get(o runtime.Object) error
- func (m *SdkMockStateful) List(namespace string, o runtime.Object) error
- func (m *SdkMockStateful) Update(o runtime.Object) error
- func (m *SdkMockStateful) WithDeleteOptions(metaDeleteOptions *metav1.DeleteOptions) interface{}
- type TestError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockSdkOperations ¶
type MockSdkOperations struct {
// contains filtered or unexported fields
}
MockSdkOperations is a mock of SdkOperations interface
func CreateMock ¶
func CreateMock(t *testing.T) (*gomock.Controller, *MockSdkOperations)
func NewMockSdkOperations ¶
func NewMockSdkOperations(ctrl *gomock.Controller) *MockSdkOperations
NewMockSdkOperations creates a new mock instance
func (*MockSdkOperations) Create ¶
func (m *MockSdkOperations) Create(o runtime.Object) error
Create mocks base method
func (*MockSdkOperations) Delete ¶
func (m *MockSdkOperations) Delete(o runtime.Object, opts ...interface{}) error
Delete mocks base method
func (*MockSdkOperations) EXPECT ¶
func (m *MockSdkOperations) EXPECT() *MockSdkOperationsMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockSdkOperations) Get ¶
func (m *MockSdkOperations) Get(o runtime.Object) error
Get mocks base method
func (*MockSdkOperations) List ¶
func (m *MockSdkOperations) List(namespace string, o runtime.Object) error
List mocks base method
func (*MockSdkOperations) Update ¶
func (m *MockSdkOperations) Update(o runtime.Object) error
Update mocks base method
func (*MockSdkOperations) WithDeleteOptions ¶
func (m *MockSdkOperations) WithDeleteOptions(metaDeleteOptions *v1.DeleteOptions) interface{}
WithDeleteOptions mocks base method
type MockSdkOperationsMockRecorder ¶
type MockSdkOperationsMockRecorder struct {
// contains filtered or unexported fields
}
MockSdkOperationsMockRecorder is the mock recorder for MockSdkOperations
func (*MockSdkOperationsMockRecorder) Create ¶
func (mr *MockSdkOperationsMockRecorder) Create(o interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockSdkOperationsMockRecorder) Delete ¶
func (mr *MockSdkOperationsMockRecorder) Delete(o interface{}, opts ...interface{}) *gomock.Call
Delete indicates an expected call of Delete
func (*MockSdkOperationsMockRecorder) Get ¶
func (mr *MockSdkOperationsMockRecorder) Get(o interface{}) *gomock.Call
Get indicates an expected call of Get
func (*MockSdkOperationsMockRecorder) List ¶
func (mr *MockSdkOperationsMockRecorder) List(namespace, o interface{}) *gomock.Call
List indicates an expected call of List
func (*MockSdkOperationsMockRecorder) Update ¶
func (mr *MockSdkOperationsMockRecorder) Update(o interface{}) *gomock.Call
Update indicates an expected call of Update
func (*MockSdkOperationsMockRecorder) WithDeleteOptions ¶
func (mr *MockSdkOperationsMockRecorder) WithDeleteOptions(metaDeleteOptions interface{}) *gomock.Call
WithDeleteOptions indicates an expected call of WithDeleteOptions
type SdkMockStateful ¶
type SdkMockStateful struct {
// contains filtered or unexported fields
}
SdkMockStateful sdk operator mock that creates, updates, gets and deletes CRs. Note that the implementation doesn't perform all checks a full kubernetes would do. For example, for an update, a k8s would check if the resourceVersion of the stored object matches the version of the new version.
func NewSdkMockBackedByFake ¶
func NewSdkMockBackedByFake(t *testing.T, k8sCs kubernetes.Interface) *SdkMockStateful
NewSdkMockBackedByFake creates a new sdk mock, which keeps state and uses k8s for known CRs. Note that the implementation doesn't perform all checks a full kubernetes would do. For example, for an update, a k8s would check if the resourceVersion of the stored object matches the version of the new version.
func (*SdkMockStateful) Create ¶
func (m *SdkMockStateful) Create(o runtime.Object) error
Create creates the CR
func (*SdkMockStateful) Delete ¶
func (m *SdkMockStateful) Delete(o runtime.Object, opts ...interface{}) error
Delete deletes the CR
func (*SdkMockStateful) Get ¶
func (m *SdkMockStateful) Get(o runtime.Object) error
Get returns the CR
func (*SdkMockStateful) List ¶
func (m *SdkMockStateful) List(namespace string, o runtime.Object) error
List returns nothing
func (*SdkMockStateful) Update ¶
func (m *SdkMockStateful) Update(o runtime.Object) error
Update updates the CR
func (*SdkMockStateful) WithDeleteOptions ¶
func (m *SdkMockStateful) WithDeleteOptions(metaDeleteOptions *metav1.DeleteOptions) interface{}
WithDeleteOptions does nothing