Documentation ¶
Index ¶
- type KameletRecorder
- func (sr *KameletRecorder) CreateKameletBinding(binding *camelkapis.KameletBinding, err error)
- func (sr *KameletRecorder) DeleteKameletBinding(name string, err error)
- func (sr *KameletRecorder) Get(kamelet *camelkapis.Kamelet, err error)
- func (sr *KameletRecorder) GetKameletBinding(binding *camelkapis.KameletBinding, err error)
- func (sr *KameletRecorder) List(kameletList *camelkapis.KameletList, err error)
- func (sr *KameletRecorder) ListBindings(bindings *camelkapis.KameletBindingList, err error)
- func (sr *KameletRecorder) UpdateKameletBinding(binding *camelkapis.KameletBinding, err error)
- func (sr *KameletRecorder) Validate()
- type MockClient
- func (c *MockClient) CamelV1() camelkv1.CamelV1Interface
- func (c *MockClient) CamelV1alpha1() *camelkv1alpha1.CamelV1alpha1Interface
- func (c *MockClient) GetConfig() *rest.Config
- func (c *MockClient) GetCurrentNamespace(kubeConfig string) (string, error)
- func (c *MockClient) GetScheme() *runtime.Scheme
- func (c *MockClient) KameletBindings(namespace string) camelkv1alpha1.KameletBindingInterface
- func (c *MockClient) Kamelets(namespace string) camelkv1alpha1.KameletInterface
- func (c *MockClient) RESTClient() rest.Interface
- func (c *MockClient) Recorder() *KameletRecorder
- type MockKameletBindingsClient
- func (c *MockKameletBindingsClient) Create(ctx context.Context, binding *camelkapis.KameletBinding, opts v1.CreateOptions) (*camelkapis.KameletBinding, error)
- func (c *MockKameletBindingsClient) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
- func (c *MockKameletBindingsClient) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
- func (c *MockKameletBindingsClient) Get(ctx context.Context, name string, opts v1.GetOptions) (*camelkapis.KameletBinding, error)
- func (c *MockKameletBindingsClient) List(ctx context.Context, opts v1.ListOptions) (*camelkapis.KameletBindingList, error)
- func (c *MockKameletBindingsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, ...) (result *camelkapis.KameletBinding, err error)
- func (c *MockKameletBindingsClient) Update(ctx context.Context, binding *camelkapis.KameletBinding, opts v1.UpdateOptions) (*camelkapis.KameletBinding, error)
- func (c *MockKameletBindingsClient) UpdateStatus(ctx context.Context, binding *camelkapis.KameletBinding, opts v1.UpdateOptions) (*camelkapis.KameletBinding, error)
- func (c *MockKameletBindingsClient) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
- type MockKameletClient
- func (c *MockKameletClient) Create(ctx context.Context, kamelet *camelkapis.Kamelet, opts v1.CreateOptions) (*camelkapis.Kamelet, error)
- func (c *MockKameletClient) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
- func (c *MockKameletClient) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
- func (c *MockKameletClient) Get(ctx context.Context, name string, opts v1.GetOptions) (*camelkapis.Kamelet, error)
- func (c *MockKameletClient) List(ctx context.Context, opts v1.ListOptions) (*camelkapis.KameletList, error)
- func (c *MockKameletClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, ...) (result *camelkapis.Kamelet, err error)
- func (c *MockKameletClient) Update(ctx context.Context, kamelet *camelkapis.Kamelet, opts v1.UpdateOptions) (*camelkapis.Kamelet, error)
- func (c *MockKameletClient) UpdateStatus(ctx context.Context, kamelet *camelkapis.Kamelet, opts v1.UpdateOptions) (*camelkapis.Kamelet, error)
- func (c *MockKameletClient) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KameletRecorder ¶
type KameletRecorder struct {
// contains filtered or unexported fields
}
KameletRecorder is recorder for eventing objects
func (*KameletRecorder) CreateKameletBinding ¶
func (sr *KameletRecorder) CreateKameletBinding(binding *camelkapis.KameletBinding, err error)
CreateKameletBinding records a call for CreateKameletBinding with the expected result and error (nil if none)
func (*KameletRecorder) DeleteKameletBinding ¶ added in v0.30.0
func (sr *KameletRecorder) DeleteKameletBinding(name string, err error)
DeleteKameletBinding records a call for DeleteKameletBinding with the expected name and error (nil if none)
func (*KameletRecorder) Get ¶
func (sr *KameletRecorder) Get(kamelet *camelkapis.Kamelet, err error)
Get records a call for GetKamelet with the expected result and error (nil if none)
func (*KameletRecorder) GetKameletBinding ¶
func (sr *KameletRecorder) GetKameletBinding(binding *camelkapis.KameletBinding, err error)
GetKameletBinding records a call for Get with the expected result and error (nil if none)
func (*KameletRecorder) List ¶
func (sr *KameletRecorder) List(kameletList *camelkapis.KameletList, err error)
List records a call for ListKamelets with the expected result and error (nil if none)
func (*KameletRecorder) ListBindings ¶
func (sr *KameletRecorder) ListBindings(bindings *camelkapis.KameletBindingList, err error)
List records a call for ListKameletBindings with the expected result and error (nil if none)
func (*KameletRecorder) UpdateKameletBinding ¶
func (sr *KameletRecorder) UpdateKameletBinding(binding *camelkapis.KameletBinding, err error)
UpdateKameletBinding records a call for Update with the expected result and error (nil if none)
func (*KameletRecorder) Validate ¶
func (sr *KameletRecorder) Validate()
Validate validates whether every recorded action has been called
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a combine of test object and recorder
func NewMockClient ¶
func NewMockClient(t *testing.T, ns ...string) *MockClient
NewMockClient returns a new mock instance which you need to record for
func (*MockClient) CamelV1 ¶
func (c *MockClient) CamelV1() camelkv1.CamelV1Interface
func (*MockClient) CamelV1alpha1 ¶
func (c *MockClient) CamelV1alpha1() *camelkv1alpha1.CamelV1alpha1Interface
func (*MockClient) GetConfig ¶
func (c *MockClient) GetConfig() *rest.Config
func (*MockClient) GetCurrentNamespace ¶
func (c *MockClient) GetCurrentNamespace(kubeConfig string) (string, error)
func (*MockClient) GetScheme ¶
func (c *MockClient) GetScheme() *runtime.Scheme
func (*MockClient) KameletBindings ¶
func (c *MockClient) KameletBindings(namespace string) camelkv1alpha1.KameletBindingInterface
func (*MockClient) Kamelets ¶
func (c *MockClient) Kamelets(namespace string) camelkv1alpha1.KameletInterface
func (*MockClient) RESTClient ¶
func (c *MockClient) RESTClient() rest.Interface
func (*MockClient) Recorder ¶
func (c *MockClient) Recorder() *KameletRecorder
Recorder returns the recorder for registering API calls
type MockKameletBindingsClient ¶
type MockKameletBindingsClient struct {
// contains filtered or unexported fields
}
MockKameletBindingsClient is a combine of test object and recorder
func (*MockKameletBindingsClient) Create ¶
func (c *MockKameletBindingsClient) Create(ctx context.Context, binding *camelkapis.KameletBinding, opts v1.CreateOptions) (*camelkapis.KameletBinding, error)
Create performs a previously recorded action
func (*MockKameletBindingsClient) Delete ¶
func (c *MockKameletBindingsClient) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
func (*MockKameletBindingsClient) DeleteCollection ¶
func (c *MockKameletBindingsClient) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
func (*MockKameletBindingsClient) Get ¶
func (c *MockKameletBindingsClient) Get(ctx context.Context, name string, opts v1.GetOptions) (*camelkapis.KameletBinding, error)
Get performs a previously recorded action
func (*MockKameletBindingsClient) List ¶
func (c *MockKameletBindingsClient) List(ctx context.Context, opts v1.ListOptions) (*camelkapis.KameletBindingList, error)
func (*MockKameletBindingsClient) Patch ¶
func (c *MockKameletBindingsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *camelkapis.KameletBinding, err error)
func (*MockKameletBindingsClient) Update ¶
func (c *MockKameletBindingsClient) Update(ctx context.Context, binding *camelkapis.KameletBinding, opts v1.UpdateOptions) (*camelkapis.KameletBinding, error)
func (*MockKameletBindingsClient) UpdateStatus ¶
func (c *MockKameletBindingsClient) UpdateStatus(ctx context.Context, binding *camelkapis.KameletBinding, opts v1.UpdateOptions) (*camelkapis.KameletBinding, error)
func (*MockKameletBindingsClient) Watch ¶
func (c *MockKameletBindingsClient) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
type MockKameletClient ¶
type MockKameletClient struct {
// contains filtered or unexported fields
}
MockKameletClient is a combine of test object and recorder
func (*MockKameletClient) Create ¶
func (c *MockKameletClient) Create(ctx context.Context, kamelet *camelkapis.Kamelet, opts v1.CreateOptions) (*camelkapis.Kamelet, error)
func (*MockKameletClient) Delete ¶
func (c *MockKameletClient) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
func (*MockKameletClient) DeleteCollection ¶
func (c *MockKameletClient) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
func (*MockKameletClient) Get ¶
func (c *MockKameletClient) Get(ctx context.Context, name string, opts v1.GetOptions) (*camelkapis.Kamelet, error)
Get performs a previously recorded action
func (*MockKameletClient) List ¶
func (c *MockKameletClient) List(ctx context.Context, opts v1.ListOptions) (*camelkapis.KameletList, error)
List performs a previously recorded action
func (*MockKameletClient) Patch ¶
func (c *MockKameletClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *camelkapis.Kamelet, err error)
func (*MockKameletClient) Update ¶
func (c *MockKameletClient) Update(ctx context.Context, kamelet *camelkapis.Kamelet, opts v1.UpdateOptions) (*camelkapis.Kamelet, error)
func (*MockKameletClient) UpdateStatus ¶
func (c *MockKameletClient) UpdateStatus(ctx context.Context, kamelet *camelkapis.Kamelet, opts v1.UpdateOptions) (*camelkapis.Kamelet, error)
func (*MockKameletClient) Watch ¶
func (c *MockKameletClient) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)