testutil

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Common test namespace
	DefaultTestNamespace = "default"

	// Common test timeouts
	DefaultTimeout  = time.Second * 10
	DefaultInterval = time.Millisecond * 250

	// Common test image
	DefaultRedisImage = "quay.io/opstree/redis:v7.0.12"
)

Variables

This section is empty.

Functions

func CreateTestObject

func CreateTestObject(name, namespace string, annotations map[string]string) metav1.ObjectMeta

CreateTestObject creates a test object with the given name, namespace and annotations

func RunSkipReconcileTest

func RunSkipReconcileTest(k8sClient client.Client, config SkipReconcileTestConfig)

RunSkipReconcileTest runs the skip-reconcile test logic

Types

type SkipReconcileTestConfig

type SkipReconcileTestConfig struct {
	// Object is the custom resource object to test
	Object client.Object
	// SkipAnnotationKey is the annotation key for skip-reconcile
	SkipAnnotationKey string
	// StatefulSetName is the expected StatefulSet name
	StatefulSetName string
	// Namespace is the test namespace
	Namespace string
	// Timeout for Eventually assertions
	Timeout time.Duration
	// Interval for Eventually assertions
	Interval time.Duration
}

SkipReconcileTestConfig holds configuration for skip-reconcile tests

Jump to

Keyboard shortcuts

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