testing

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: Apache-2.0 Imports: 23 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 HasCondition

func HasCondition(conditions []metav1.Condition, expectedType, expectedReason string, expectedStatus metav1.ConditionStatus) bool

func NewAddOnPlacementScore added in v0.3.0

func NewAddOnPlacementScore(clusternamespace, name string) *addOnPlacementScoreBuilder

func NewClusterInformerFactory

func NewClusterInformerFactory(clusterClient clusterclient.Interface, objects ...runtime.Object) clusterinformers.SharedInformerFactory

func NewClusterSet

func NewClusterSet(clusterSetName string) *managedClusterSetBuilder

func NewClusterSetBinding

func NewClusterSetBinding(namespace, clusterSetName string) *clusterapiv1beta2.ManagedClusterSetBinding

func NewManagedCluster

func NewManagedCluster(clusterName string) *managedClusterBuilder

func NewPlacement

func NewPlacement(namespace, name string) *placementBuilder

func NewPlacementDecision

func NewPlacementDecision(namespace, name string) *placementDecisionBuilder

func NewPlacementWithAnnotations added in v0.9.0

func NewPlacementWithAnnotations(namespace, name string, annotations map[string]string) *placementBuilder

Types

type FakePluginHandle added in v0.2.0

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

func NewFakePluginHandle added in v0.2.0

func NewFakePluginHandle(
	t *testing.T, client *clusterfake.Clientset, objects ...runtime.Object) *FakePluginHandle

func (*FakePluginHandle) ClusterClient added in v0.2.0

func (f *FakePluginHandle) ClusterClient() clusterclient.Interface

func (*FakePluginHandle) ClusterLister added in v0.4.0

func (*FakePluginHandle) DecisionLister added in v0.2.0

func (*FakePluginHandle) EventRecorder added in v0.2.0

func (f *FakePluginHandle) EventRecorder() kevents.EventRecorder

func (*FakePluginHandle) ScoreLister added in v0.3.0

type FakeSyncContext

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

func NewFakeSyncContext

func NewFakeSyncContext(t *testing.T, queueKey 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