Documentation ¶
Index ¶
- func AssertActions(t *testing.T, actualActions []clienttesting.Action, expectedVerbs ...string)
- func AssertNoActions(t *testing.T, actualActions []clienttesting.Action)
- func DeleteManagedCluster(c *clusterv1.ManagedCluster) *clusterv1.ManagedCluster
- func NewAddon(name, namespace string, owners ...metav1.OwnerReference) *addonapiv1alpha1.ManagedClusterAddOn
- func NewApprovedCSR(addon, cluster string) *certv1.CertificateSigningRequest
- func NewApprovedV1beta1CSR(addon, cluster string) *certv1beta1.CertificateSigningRequest
- func NewCSR(addon, cluster string) *certv1.CertificateSigningRequest
- func NewClusterManagementAddon(name, crd, cr string) *addonapiv1alpha1.ClusterManagementAddOn
- func NewDeniedCSR(addon, cluster string) *certv1.CertificateSigningRequest
- func NewDeniedV1beta1CSR(addon, cluster string) *certv1beta1.CertificateSigningRequest
- func NewHookJob(name, namespace string) *unstructured.Unstructured
- func NewHostedHookJob(name, namespace string) *unstructured.Unstructured
- func NewHostedModeAddon(name, namespace string, hostingCluster string, owners ...metav1.OwnerReference) *addonapiv1alpha1.ManagedClusterAddOn
- func NewHostedModeAddonWithFinalizer(name, namespace string, hostingCluster string, owners ...metav1.OwnerReference) *addonapiv1alpha1.ManagedClusterAddOn
- func NewHostingUnstructured(apiVersion, kind, namespace, name string) *unstructured.Unstructured
- func NewManagedCluster(name string) *clusterv1.ManagedCluster
- func NewManifestWork(name, namespace string, objects ...*unstructured.Unstructured) *workapiv1.ManifestWork
- func NewTestingEventRecorder(t *testing.T) events.Recorder
- func NewUnstructured(apiVersion, kind, namespace, name string) *unstructured.Unstructured
- func NewV1beta1CSR(addon, cluster string) *certv1beta1.CertificateSigningRequest
- func SetAddonDeletionTimestamp(addon *addonapiv1alpha1.ManagedClusterAddOn, deletionTimestamp time.Time) *addonapiv1alpha1.ManagedClusterAddOn
- func SetAddonFinalizers(addon *addonapiv1alpha1.ManagedClusterAddOn, finalizers ...string) *addonapiv1alpha1.ManagedClusterAddOn
- func SetManagedClusterAnnotation(c *clusterv1.ManagedCluster, annotations map[string]string) *clusterv1.ManagedCluster
- type FakeSyncContext
- type TestingEventRecorder
- func (r *TestingEventRecorder) ComponentName() string
- func (r *TestingEventRecorder) Event(reason, message string)
- func (r *TestingEventRecorder) Eventf(reason, messageFmt string, args ...interface{})
- func (r *TestingEventRecorder) ForComponent(c string) events.Recorder
- func (r *TestingEventRecorder) Shutdown()
- func (r *TestingEventRecorder) Warning(reason, message string)
- func (r *TestingEventRecorder) Warningf(reason, messageFmt string, args ...interface{})
- func (r *TestingEventRecorder) WithComponentSuffix(suffix string) events.Recorder
- func (r *TestingEventRecorder) WithContext(ctx context.Context) events.Recorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertActions ¶
func AssertActions(t *testing.T, actualActions []clienttesting.Action, expectedVerbs ...string)
AssertActions asserts the actual actions have the expected action verb
func AssertNoActions ¶
func AssertNoActions(t *testing.T, actualActions []clienttesting.Action)
AssertNoActions asserts no actions are happened
func DeleteManagedCluster ¶ added in v0.4.0
func DeleteManagedCluster(c *clusterv1.ManagedCluster) *clusterv1.ManagedCluster
func NewAddon ¶
func NewAddon(name, namespace string, owners ...metav1.OwnerReference) *addonapiv1alpha1.ManagedClusterAddOn
func NewApprovedCSR ¶
func NewApprovedCSR(addon, cluster string) *certv1.CertificateSigningRequest
func NewApprovedV1beta1CSR ¶ added in v0.3.0
func NewApprovedV1beta1CSR(addon, cluster string) *certv1beta1.CertificateSigningRequest
func NewCSR ¶
func NewCSR(addon, cluster string) *certv1.CertificateSigningRequest
func NewClusterManagementAddon ¶
func NewClusterManagementAddon(name, crd, cr string) *addonapiv1alpha1.ClusterManagementAddOn
func NewDeniedCSR ¶
func NewDeniedCSR(addon, cluster string) *certv1.CertificateSigningRequest
func NewDeniedV1beta1CSR ¶ added in v0.3.0
func NewDeniedV1beta1CSR(addon, cluster string) *certv1beta1.CertificateSigningRequest
func NewHookJob ¶ added in v0.5.0
func NewHookJob(name, namespace string) *unstructured.Unstructured
func NewHostedHookJob ¶ added in v0.5.0
func NewHostedHookJob(name, namespace string) *unstructured.Unstructured
func NewHostedModeAddon ¶ added in v0.5.0
func NewHostedModeAddon(name, namespace string, hostingCluster string, owners ...metav1.OwnerReference) *addonapiv1alpha1.ManagedClusterAddOn
func NewHostedModeAddonWithFinalizer ¶ added in v0.5.0
func NewHostedModeAddonWithFinalizer(name, namespace string, hostingCluster string, owners ...metav1.OwnerReference) *addonapiv1alpha1.ManagedClusterAddOn
func NewHostingUnstructured ¶ added in v0.5.0
func NewHostingUnstructured(apiVersion, kind, namespace, name string) *unstructured.Unstructured
func NewManagedCluster ¶
func NewManagedCluster(name string) *clusterv1.ManagedCluster
func NewManifestWork ¶
func NewManifestWork(name, namespace string, objects ...*unstructured.Unstructured) *workapiv1.ManifestWork
func NewTestingEventRecorder ¶ added in v0.4.0
NewTestingEventRecorder provides event recorder that will log all recorded events to the error log.
func NewUnstructured ¶
func NewUnstructured(apiVersion, kind, namespace, name string) *unstructured.Unstructured
func NewV1beta1CSR ¶ added in v0.3.0
func NewV1beta1CSR(addon, cluster string) *certv1beta1.CertificateSigningRequest
func SetAddonDeletionTimestamp ¶ added in v0.5.0
func SetAddonDeletionTimestamp(addon *addonapiv1alpha1.ManagedClusterAddOn, deletionTimestamp time.Time) *addonapiv1alpha1.ManagedClusterAddOn
func SetAddonFinalizers ¶ added in v0.5.0
func SetAddonFinalizers(addon *addonapiv1alpha1.ManagedClusterAddOn, finalizers ...string) *addonapiv1alpha1.ManagedClusterAddOn
func SetManagedClusterAnnotation ¶ added in v0.5.0
func SetManagedClusterAnnotation(c *clusterv1.ManagedCluster, annotations map[string]string) *clusterv1.ManagedCluster
Types ¶
type FakeSyncContext ¶
type FakeSyncContext struct {
// contains filtered or unexported fields
}
func NewFakeSyncContext ¶
func NewFakeSyncContext(t *testing.T) *FakeSyncContext
func (FakeSyncContext) Queue ¶
func (f FakeSyncContext) Queue() workqueue.RateLimitingInterface
func (FakeSyncContext) Recorder ¶
func (f FakeSyncContext) Recorder() events.Recorder
type TestingEventRecorder ¶ added in v0.4.0
type TestingEventRecorder struct {
// contains filtered or unexported fields
}
func (*TestingEventRecorder) ComponentName ¶ added in v0.4.0
func (r *TestingEventRecorder) ComponentName() string
func (*TestingEventRecorder) Event ¶ added in v0.4.0
func (r *TestingEventRecorder) Event(reason, message string)
func (*TestingEventRecorder) Eventf ¶ added in v0.4.0
func (r *TestingEventRecorder) Eventf(reason, messageFmt string, args ...interface{})
func (*TestingEventRecorder) ForComponent ¶ added in v0.4.0
func (r *TestingEventRecorder) ForComponent(c string) events.Recorder
func (*TestingEventRecorder) Shutdown ¶ added in v0.4.0
func (r *TestingEventRecorder) Shutdown()
func (*TestingEventRecorder) Warning ¶ added in v0.4.0
func (r *TestingEventRecorder) Warning(reason, message string)
func (*TestingEventRecorder) Warningf ¶ added in v0.4.0
func (r *TestingEventRecorder) Warningf(reason, messageFmt string, args ...interface{})
func (*TestingEventRecorder) WithComponentSuffix ¶ added in v0.4.0
func (r *TestingEventRecorder) WithComponentSuffix(suffix string) events.Recorder
func (*TestingEventRecorder) WithContext ¶ added in v0.4.0
func (r *TestingEventRecorder) WithContext(ctx context.Context) events.Recorder
Click to show internal directories.
Click to hide internal directories.