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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to test my API endpoint that list files from an AWS S3 Bucket:
I see from AWS SDK documentation that to mock AWS client functions you can use it interface so in my
main_test.go
I created these:My question is, how could I test my API calling it from the test but without calling AWS but instead using the values I mocked?
If I use httptest to call the endpoint it will call the real endpoint calling AWS.
Beta Was this translation helpful? Give feedback.
All reactions