infobloxopen / infoblox-go-client

Infoblox NIOS WAPI Go Client library
Apache License 2.0
35 stars 88 forks source link

Fake client for unit testing or more exported fields #181

Open snorwin opened 2 years ago

snorwin commented 2 years ago

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 the searchFields of QueryParams are unexported.

What are you thinking about this?

kuritka commented 1 year 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:

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.