util

package
v0.2.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentEtcdClusterController    = "etcdcluster-controller"
	ComponentEtcdInspectionController = "etcdinspection-controller"
)
View Source
const (
	ClusterTLSSecretName      = "certName"
	ClusterExtensionClientURL = "extClientURL"
)

Variables

This section is empty.

Functions

func CheckAction

func CheckAction(expected, actual core.Action, t *testing.T)

CheckAction verifies that expected and actual actions are equal and both have same attached resources

func CompareActions

func CompareActions(t *testing.T, actions []core.Action, filteredActions []core.Action)

func FilterInformerActions

func FilterInformerActions(actions []core.Action, resourceName string) []core.Action

FilterInformerActions filters list and watch actions for testing resources. Since list and watch don't change resource state we can filter it to lower nose level in our tests.

func ProcessWorkQueue

func ProcessWorkQueue(
	queue workqueue.RateLimitingInterface,
	syncHandler func(eKey string) error,
	obj interface{}) error

ProcessWorkQueue handle item in queue, handle the result of syncHandler

Types

type ClientBuilder

type ClientBuilder interface {
	ConfigOrDie() *restclient.Config
	ClientOrDie() clientset.Interface
	DynamicClientOrDie() dynamic.Interface
}

func NewFakeClientBuilder

func NewFakeClientBuilder() ClientBuilder

func NewSimpleClientBuilder

func NewSimpleClientBuilder(kubeconfig string) ClientBuilder

type EtcdClusterPhase

type EtcdClusterPhase string
const (
	EtcdClusterCreating     EtcdClusterPhase = "EtcdClusterCreating"
	EtcdClusterUpdating     EtcdClusterPhase = "EtcdClusterUpdating"
	EtcdClusterUpdateStatus EtcdClusterPhase = "EtcdClusterUpdateStatus"
)

Jump to

Keyboard shortcuts

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