testutil

package
v0.0.0-...-cfe22c1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMinimalYtsaurus

func BuildMinimalYtsaurus(namespace, name string) ytv1.Ytsaurus

func DeployObject

func DeployObject(h *TestHelper, object client.Object)

func Eventually

func Eventually(h *TestHelper, description string, condition func() bool)

func FetchAndCheckConfigMapContainsEventually

func FetchAndCheckConfigMapContainsEventually(h *TestHelper, objectKey, cmKey, expectSubstr string)

func FetchAndCheckEventually

func FetchAndCheckEventually(h *TestHelper, key string, obj client.Object, condDescription string, condition func(obj client.Object) bool)

func FetchConfigMapData

func FetchConfigMapData(h *TestHelper, objectKey, mapKey string) string

func FetchEventually

func FetchEventually(h *TestHelper, key string, obj client.Object)

func GetObject

func GetObject(h *TestHelper, key string, emptyObject client.Object)

helpers

func ListObjects

func ListObjects(h *TestHelper, emptyList client.ObjectList)

func MarkAllJobsCompleted

func MarkAllJobsCompleted(h *TestHelper)

func MarkJobSucceeded

func MarkJobSucceeded(h *TestHelper, key string)

func UpdateObject

func UpdateObject(h *TestHelper, emptyObject, newObject client.Object)

func UpdateObjectStatus

func UpdateObjectStatus(h *TestHelper, newObject client.Object)

Types

type TestHelper

type TestHelper struct {
	Namespace string
	// contains filtered or unexported fields
}

func NewTestHelper

func NewTestHelper(t *testing.T, namespace, crdDirectoryPath string) *TestHelper

func (*TestHelper) GetK8sClient

func (h *TestHelper) GetK8sClient() client.Client

func (*TestHelper) GetObjectKey

func (h *TestHelper) GetObjectKey(name string) client.ObjectKey

func (*TestHelper) GetObjectMeta

func (h *TestHelper) GetObjectMeta(name string) metav1.ObjectMeta

func (*TestHelper) Log

func (h *TestHelper) Log(args ...any)

func (*TestHelper) Logf

func (h *TestHelper) Logf(format string, args ...any)

func (*TestHelper) Start

func (h *TestHelper) Start(reconcilerSetup func(mgr ctrl.Manager) error)

func (*TestHelper) Stop

func (h *TestHelper) Stop()

Jump to

Keyboard shortcuts

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