mirror of
https://github.com/wahyd4/cert-manager.git
synced 2026-08-13 23:26:46 +10:00
Previously, each provider's package-level 'New' function was being called. That made mocking it out for a different function that records data or returns different output quite difficult. This PR introduces an additional layer of abstraction in the form of effectively a vtable struct for the dns providers. It's defaulted to the same package-level constructors as before, but unit tests in the dns package can easily override it. A new test for the previously-introduced route53 trimming behavior is also added.