addontesting

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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 NewAddon

func NewAddon(name, namespace string, owners ...metav1.OwnerReference) *addonapiv1alpha1.ManagedClusterAddOn

func NewApprovedCSR

func NewApprovedCSR(addon, cluster string) *certv1.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 NewManagedCluster

func NewManagedCluster(name string) *clusterv1.ManagedCluster

func NewManifestWork

func NewManifestWork(name, namespace string, objects ...*unstructured.Unstructured) *workapiv1.ManifestWork

func NewUnstructured

func NewUnstructured(apiVersion, kind, namespace, name string) *unstructured.Unstructured

Types

type FakeSyncContext

type FakeSyncContext struct {
	// contains filtered or unexported fields
}

func NewFakeSyncContext

func NewFakeSyncContext(t *testing.T, addonKey string) *FakeSyncContext

func (FakeSyncContext) Queue

func (FakeSyncContext) QueueKey

func (f FakeSyncContext) QueueKey() string

func (FakeSyncContext) Recorder

func (f FakeSyncContext) Recorder() events.Recorder

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL