Documentation
¶
Index ¶
- Variables
- func IsWebhookServerEnabled() bool
- func NewAddonWithInstallSpec(installSpec addonsv1alpha1.AddonInstallSpec, addonName string) *addonsv1alpha1.Addon
- func NewStatusError(msg string) *k8sApiErrors.StatusError
- func NewTestAddonWithCatalogSourceImage() *addonsv1alpha1.Addon
- func NewTestAddonWithMultipleNamespaces() *addonsv1alpha1.Addon
- func NewTestAddonWithSingleNamespace() *addonsv1alpha1.Addon
- func NewTestAddonWithoutNamespace() *addonsv1alpha1.Addon
- func NewTestCatalogSource() *operatorsv1alpha1.CatalogSource
- func NewTestCatalogSourceWithoutOwner() *operatorsv1alpha1.CatalogSource
- func NewTestErrNotFound() *k8sApiErrors.StatusError
- func NewTestExistingNamespaceWithOwner() *corev1.Namespace
- func NewTestExistingNamespaceWithoutOwner() *corev1.Namespace
- func NewTestNamespace() *corev1.Namespace
- func NewTestSchemeWithAddonsv1alpha1() *runtime.Scheme
- type Client
- func (c *Client) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (c *Client) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (c *Client) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (c *Client) Get(ctx context.Context, key types.NamespacedName, obj client.Object) error
- func (c *Client) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (c *Client) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (c *Client) RESTMapper() meta.RESTMapper
- func (c *Client) Scheme() *runtime.Scheme
- func (c *Client) Status() client.StatusWriter
- func (c *Client) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type Logger
- func (l *Logger) Enabled() bool
- func (l *Logger) Error(err error, msg string, kvs ...interface{})
- func (l *Logger) Info(msg string, kvs ...interface{})
- func (l *Logger) V(level int) logr.Logger
- func (l *Logger) WithName(name string) logr.Logger
- func (l *Logger) WithValues(kvs ...interface{}) logr.Logger
- type StatusClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // core IsCoreV1NamespacePtr = mock.IsType(&corev1.Namespace{}) IsCoreV1NamespaceListPtr = mock.IsType(&corev1.NamespaceList{}) // olm IsOperatorsV1Alpha1CatalogSourcePtr = mock.IsType(&operatorsv1alpha1.CatalogSource{}) // addon.managed.openshift.io/v1alpha1 IsAddonsv1alpha1AddonPtr = mock.IsType(&addonsv1alpha1.Addon{}) IsAddonsv1alpha1AddonListPtr = mock.IsType(&addonsv1alpha1.AddonList{}) IsAddonsv1alpha1AddonOperatorPtr = mock.IsType(&addonsv1alpha1.AddonOperator{}) IsAddonsv1alpha1AddonOperatorListPtr = mock.IsType(&addonsv1alpha1.AddonOperatorList{}) // misc IsContext = mock.IsType(context.TODO()) IsObjectKey = mock.IsType(client.ObjectKey{}) )
custom testify/mock matchers
Functions ¶
func IsWebhookServerEnabled ¶ added in v0.3.0
func IsWebhookServerEnabled() bool
func NewAddonWithInstallSpec ¶ added in v0.3.0
func NewAddonWithInstallSpec(installSpec addonsv1alpha1.AddonInstallSpec, addonName string) *addonsv1alpha1.Addon
NewAddonWithInstallSpec returns an Addon object with the specified InstallSpec
func NewStatusError ¶ added in v0.3.0
func NewStatusError(msg string) *k8sApiErrors.StatusError
NewStatusError returns an error of type `StatusError `
func NewTestAddonWithCatalogSourceImage ¶ added in v0.5.0
func NewTestAddonWithCatalogSourceImage() *addonsv1alpha1.Addon
func NewTestAddonWithMultipleNamespaces ¶ added in v0.5.0
func NewTestAddonWithMultipleNamespaces() *addonsv1alpha1.Addon
func NewTestAddonWithSingleNamespace ¶ added in v0.5.0
func NewTestAddonWithSingleNamespace() *addonsv1alpha1.Addon
func NewTestAddonWithoutNamespace ¶ added in v0.5.0
func NewTestAddonWithoutNamespace() *addonsv1alpha1.Addon
func NewTestCatalogSource ¶ added in v0.5.0
func NewTestCatalogSource() *operatorsv1alpha1.CatalogSource
func NewTestCatalogSourceWithoutOwner ¶ added in v0.5.0
func NewTestCatalogSourceWithoutOwner() *operatorsv1alpha1.CatalogSource
func NewTestErrNotFound ¶ added in v0.5.0
func NewTestErrNotFound() *k8sApiErrors.StatusError
func NewTestExistingNamespaceWithOwner ¶ added in v0.5.0
func NewTestExistingNamespaceWithoutOwner ¶ added in v0.5.0
func NewTestNamespace ¶ added in v0.5.0
func NewTestSchemeWithAddonsv1alpha1 ¶ added in v0.5.0
Types ¶
type Client ¶
type Client struct {
mock.Mock
StatusMock *StatusClient
}
Client is a mock for the controller-runtime dynamic client interface.
func (*Client) DeleteAllOf ¶
func (*Client) List ¶
func (c *Client) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
func (*Client) RESTMapper ¶
func (c *Client) RESTMapper() meta.RESTMapper
func (*Client) Status ¶
func (c *Client) Status() client.StatusWriter
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger implements logr.Logger and logs to testing.T to preserve the order of log lines in tests.
func (*Logger) WithValues ¶
WithValues implements logr.Logger.WithValues
type StatusClient ¶
func (*StatusClient) Patch ¶
func (c *StatusClient) Patch( ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
func (*StatusClient) Update ¶
func (c *StatusClient) Update( ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
Click to show internal directories.
Click to hide internal directories.