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
With aws-sdk-go v1 I swapped out the default Send handler and used my own to mock responses from the client.
I'm trying to do this again for aws-sdk-go-v2 and see we can add custom middleware, but I'm having trouble understanding how to do so. I've tried adding a middleware after the Deserialize step, but it doesn't seem to let me modify the output response, only the input request. Is there a way I can do this?
My goal is to mock the Uploader in the features/s3/manager package. I initially wanted to use the recommended method of creating an interface and mocking that but unfortunately Uploader doesn't satisfy the interface because the method signatures are different. The interface is:
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
-
With aws-sdk-go v1 I swapped out the default Send handler and used my own to mock responses from the client.
I'm trying to do this again for aws-sdk-go-v2 and see we can add custom middleware, but I'm having trouble understanding how to do so. I've tried adding a middleware after the Deserialize step, but it doesn't seem to let me modify the output response, only the input request. Is there a way I can do this?
My goal is to mock the Uploader in the features/s3/manager package. I initially wanted to use the recommended method of creating an interface and mocking that but unfortunately Uploader doesn't satisfy the interface because the method signatures are different. The interface is:
but the Uploader type has the method:
Beta Was this translation helpful? Give feedback.
All reactions