Documentation
¶
Overview ¶
Package secrets holds verification helpers for the Secret references that object CRDs publish in their status, shared by more than one object test package. Verification helpers for a different resource belong in a package named for that resource, not here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertRefs ¶
func AssertRefs(ctx context.Context, t *testing.T, k8sh *utils.K8sHelper, refs []cephv1.SecretReference, expected ...*corev1.Secret)
AssertRefs verifies that refs contains exactly one SecretReference per expected Secret and that each matches the live secret's Name, Namespace, UID, and ResourceVersion. Live secrets are fetched from each expected secret's own namespace.
func RequireStatusRefs ¶
func RequireStatusRefs[T, L runtime.Object]( t *testing.T, k8sh *utils.K8sHelper, client wait4.NamespacedWatcher[T, L], name, desc string, refsOf func(T) []cephv1.SecretReference, expected ...*corev1.Secret, )
RequireStatusRefs runs a subtest named desc that waits for the status secret references returned by refsOf to reach len(expected) — the controller repopulates them asynchronously after a reconcile — and then asserts each ref against its live secret via AssertRefs. refsOf must tolerate an unpopulated status (return nil).
Types ¶
This section is empty.