Documentation ¶
Index ¶
- type Interface
- type InterfaceMock
- func (mock *InterfaceMock) GetPreflightObject(ns string) runtime.Object
- func (mock *InterfaceMock) GetPreflightObjectCalls() []struct{ ... }
- func (mock *InterfaceMock) Reconcile(ctx context.Context, installation *v1alpha1.RHMI, ...) (v1alpha1.StatusPhase, error)
- func (mock *InterfaceMock) ReconcileCalls() []struct{ ... }
- type NoOp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { Reconcile(ctx context.Context, installation *integreatlyv1alpha1.RHMI, product *integreatlyv1alpha1.RHMIProductStatus, serverClient k8sclient.Client) (newPhase integreatlyv1alpha1.StatusPhase, err error) GetPreflightObject(ns string) runtime.Object }
func NewReconciler ¶
func NewReconciler(product integreatlyv1alpha1.ProductName, rc *rest.Config, configManager config.ConfigReadWriter, installation *integreatlyv1alpha1.RHMI, mgr manager.Manager) (reconciler Interface, err error)
type InterfaceMock ¶
type InterfaceMock struct { // GetPreflightObjectFunc mocks the GetPreflightObject method. GetPreflightObjectFunc func(ns string) runtime.Object // ReconcileFunc mocks the Reconcile method. ReconcileFunc func(ctx context.Context, installation *v1alpha1.RHMI, product *v1alpha1.RHMIProductStatus, serverClient client.Client) (v1alpha1.StatusPhase, error) // contains filtered or unexported fields }
InterfaceMock is a mock implementation of Interface.
func TestSomethingThatUsesInterface(t *testing.T) { // make and configure a mocked Interface mockedInterface := &InterfaceMock{ GetPreflightObjectFunc: func(ns string) runtime.Object { panic("mock out the GetPreflightObject method") }, ReconcileFunc: func(ctx context.Context, installation *v1alpha1.RHMI, product *v1alpha1.RHMIProductStatus, serverClient client.Client) (v1alpha1.StatusPhase, error) { panic("mock out the Reconcile method") }, } // use mockedInterface in code that requires Interface // and then make assertions. }
func (*InterfaceMock) GetPreflightObject ¶
func (mock *InterfaceMock) GetPreflightObject(ns string) runtime.Object
GetPreflightObject calls GetPreflightObjectFunc.
func (*InterfaceMock) GetPreflightObjectCalls ¶
func (mock *InterfaceMock) GetPreflightObjectCalls() []struct { Ns string }
GetPreflightObjectCalls gets all the calls that were made to GetPreflightObject. Check the length with:
len(mockedInterface.GetPreflightObjectCalls())
func (*InterfaceMock) Reconcile ¶
func (mock *InterfaceMock) Reconcile(ctx context.Context, installation *v1alpha1.RHMI, product *v1alpha1.RHMIProductStatus, serverClient client.Client) (v1alpha1.StatusPhase, error)
Reconcile calls ReconcileFunc.
func (*InterfaceMock) ReconcileCalls ¶
func (mock *InterfaceMock) ReconcileCalls() []struct { Ctx context.Context Installation *v1alpha1.RHMI Product *v1alpha1.RHMIProductStatus ServerClient client.Client }
ReconcileCalls gets all the calls that were made to Reconcile. Check the length with:
len(mockedInterface.ReconcileCalls())
type NoOp ¶
type NoOp struct { }
func (*NoOp) Reconcile ¶
func (n *NoOp) Reconcile(_ context.Context, _ *integreatlyv1alpha1.RHMI, _ *integreatlyv1alpha1.RHMIProductStatus, _ k8sclient.Client) (integreatlyv1alpha1.StatusPhase, error)
Click to show internal directories.
Click to hide internal directories.