Documentation
¶
Overview ¶
Package ddtest holds the test helper every controller package uses to prove that wrapping its external client with the drift detection decorator changes nothing for a resource that carries no spec.driftDetection block. It is imported by tests only.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
Convert returns from re-expressed as a To, through its JSON form. It is how a test builds the namespaced twin of a cluster-scoped fixture: both scopes share their field names.
func RequirePassThrough ¶
func RequirePassThrough(t *testing.T, newClient func() managed.ExternalClient, newCR func() resource.Managed)
RequirePassThrough observes a fresh resource through a bare client and through the same kind of client wrapped by the decorator, and fails the test unless the two are indistinguishable: same observation, same error, same resulting resource (spec, status and conditions, ignoring timestamps), and no DriftDetected condition.
newClient must return a new, independent client on every call, and newCR a new resource with no spec.driftDetection block.
Types ¶
This section is empty.