You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 23, 2025. It is now read-only.
Hey guys,
I'm was playing around with https://github.com/cloudamqp/terraform-provider and trying to write some unittests and stumbled across a possible issue.
Have a look how the api variable is casted from
interface{}to*.api.API:resource_image.go
This would be easy to test if I could inject the api client with a fake mux to actually test the requests but the underlying code looks like this:
api/api.go
Written this way, I seem to be unable to use a different Client when defining a custom API struct since the sling property was not exported.
Is there another way to test without injecting the sling client? If so, how can I do it?
Cheers!