Closed maarek closed 4 years ago
I think both ideas area great. I went ahead and defined a new interface called ISchemaRegistryClient
to abstract away the functions provided by SchemaRegistryClient. That should help in allowing the code to be extended with any needed mock. However, I didn't created a overloaded version of the CreateSchemaRegistryClient
to accept an http client. Would you like to provide a PR for this?
Thanks,
-- @riferrei
The SchemaRegistryClient should either implement an interface so that its functionality can be mocked or it should have the option to accept an http client so the underlying http client can be mocked.
Or Both? This would be an alternative to testing using net/http/httptest. Thoughts?