Documentation ¶
Index ¶
- Variables
- type ResourceCleanupPolicy
- type TestReconciler
- func (r *TestReconciler) BuildCleanupFunc(ctx context.Context, unstruct *unstructured.Unstructured, ...) func()
- func (r *TestReconciler) CreateAndReconcile(ctx context.Context, unstructs []*unstructured.Unstructured, ...) func()
- func (r *TestReconciler) NewReconcilerForKind(kind string) reconcile.Reconciler
- func (r *TestReconciler) Reconcile(ctx context.Context, unstruct *unstructured.Unstructured, ...)
- func (r *TestReconciler) ReconcileIfManagedByKCC(ctx context.Context, unstruct *unstructured.Unstructured, ...)
- func (r *TestReconciler) ReconcileObjectMeta(ctx context.Context, om metav1.ObjectMeta, kind string, ...)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ResourceCleanupPolicy ¶
type ResourceCleanupPolicy string
const ( // Always clean up resources. CleanupPolicyAlways ResourceCleanupPolicy = "Always" // Clean up resources on test success or while a test is successful, once the test enters a FAILed state do not // clean up any more resources. CleanupPolicyOnSuccess ResourceCleanupPolicy = "OnSuccess" )
type TestReconciler ¶
type TestReconciler struct {
// contains filtered or unexported fields
}
func New ¶
TODO(kcc-eng): consolidate New() and NewForDCLAndTFTestReconciler() and keep the name as New() by refactoring all existing usages
func NewTestReconciler ¶ added in v1.118.0
func (*TestReconciler) BuildCleanupFunc ¶
func (r *TestReconciler) BuildCleanupFunc(ctx context.Context, unstruct *unstructured.Unstructured, cleanupPolicy ResourceCleanupPolicy) func()
func (*TestReconciler) CreateAndReconcile ¶
func (r *TestReconciler) CreateAndReconcile(ctx context.Context, unstructs []*unstructured.Unstructured, cleanupPolicy ResourceCleanupPolicy) func()
Creates and reconciles all unstructureds in the unstruct list. Returns a cleanup function that should be defered immediately after calling this function.
func (*TestReconciler) NewReconcilerForKind ¶ added in v1.97.0
func (r *TestReconciler) NewReconcilerForKind(kind string) reconcile.Reconciler
func (*TestReconciler) Reconcile ¶
func (r *TestReconciler) Reconcile(ctx context.Context, unstruct *unstructured.Unstructured, expectedResult reconcile.Result, expectedErrorRegex *regexp.Regexp)
func (*TestReconciler) ReconcileIfManagedByKCC ¶
func (r *TestReconciler) ReconcileIfManagedByKCC(ctx context.Context, unstruct *unstructured.Unstructured, expectedResult reconcile.Result, expectedErrorRegexp *regexp.Regexp)
func (*TestReconciler) ReconcileObjectMeta ¶
func (r *TestReconciler) ReconcileObjectMeta(ctx context.Context, om metav1.ObjectMeta, kind string, expectedResult reconcile.Result, expectedErrorRegex *regexp.Regexp)
Click to show internal directories.
Click to hide internal directories.