Documentation ¶
Index ¶
- type ResourceCleanupPolicy
- type TestReconciler
- func (r *TestReconciler) BuildCleanupFunc(unstruct *unstructured.Unstructured, cleanupPolicy ResourceCleanupPolicy) func()
- func (r *TestReconciler) CreateAndReconcile(unstructs []*unstructured.Unstructured, cleanupPolicy ResourceCleanupPolicy) func()
- func (r *TestReconciler) NewReconcilerForKind(kind string) reconcile.Reconciler
- func (r *TestReconciler) Reconcile(unstruct *unstructured.Unstructured, expectedResult reconcile.Result, ...)
- func (r *TestReconciler) ReconcileIfManagedByKCC(unstruct *unstructured.Unstructured, expectedResult reconcile.Result, ...)
- func (r *TestReconciler) ReconcileObjectMeta(om metav1.ObjectMeta, kind string, expectedResult reconcile.Result, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 (*TestReconciler) BuildCleanupFunc ¶
func (r *TestReconciler) BuildCleanupFunc(unstruct *unstructured.Unstructured, cleanupPolicy ResourceCleanupPolicy) func()
func (*TestReconciler) CreateAndReconcile ¶
func (r *TestReconciler) CreateAndReconcile(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(unstruct *unstructured.Unstructured, expectedResult reconcile.Result, expectedErrorRegex *regexp.Regexp)
func (*TestReconciler) ReconcileIfManagedByKCC ¶
func (r *TestReconciler) ReconcileIfManagedByKCC(unstruct *unstructured.Unstructured, expectedResult reconcile.Result, expectedErrorRegexp *regexp.Regexp)
func (*TestReconciler) ReconcileObjectMeta ¶
func (r *TestReconciler) ReconcileObjectMeta(om metav1.ObjectMeta, kind string, expectedResult reconcile.Result, expectedErrorRegex *regexp.Regexp)
Click to show internal directories.
Click to hide internal directories.