Open snorwin opened 2 years ago
Hi @snorwin,
I'm from k8gb team. We do global DNS balancing on the top of Kubernetes clusters. We support Infoblox among many other DNS providers.
to unit-test our infoblox provider we created our own GO package.
Here is an example usage:
https://github.com/k8gb-io/k8gb/blob/master/controllers/gslb_controller_reconciliation_test.go#L434
fake_dns_test
: https://github.com/k8gb-io/k8gb/blob/master/controllers/internal/utils/fakedns_test.go
Here is the fakeDNS
: https://github.com/k8gb-io/k8gb/blob/master/controllers/internal/utils/fakedns.go
If you find it useful, I can extract it to a separate opensource library under k8gb-io. You can then contribute to suit your needs.
Hey folks, It would great if the library offers fake client which can be used for unit testing or at least make all fields of the arguments used in the
IBConnector
interface easy accessible. Currently it is really difficult to mock e.g.GetObject
if thesearchFields
ofQueryParams
are unexported.What are you thinking about this?