testutil

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package testutil provides fake-client test helpers shared by every reconciler package under pkg/secrets — scheme construction and ExternalSecret/Secret assertions. It lives under internal/ so it is only importable from within pkg/secrets, where it is exclusively test-only code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExternalSecretExists

func ExternalSecretExists(t *testing.T, c client.Client, name, namespace string) bool

ExternalSecretExists reports whether the named ExternalSecret exists.

func GetExternalSecret

func GetExternalSecret(t *testing.T, c client.Client, name, namespace string) *unstructured.Unstructured

GetExternalSecret fetches the named ExternalSecret, failing the test if it does not exist.

func NewScheme

func NewScheme(t *testing.T, adders ...func(*runtime.Scheme) error) *runtime.Scheme

NewScheme builds a runtime.Scheme with corev1 registered, plus any additional AddToScheme functions the caller needs — typically the environments-api CR groups required for controllerutil.SetControllerReference.

func SecretExists

func SecretExists(t *testing.T, c client.Client, name, namespace string) bool

SecretExists reports whether the named Secret exists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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