ChazMcDingle
ChazMcDingle

Reputation: 675

How to mock or stub AWS SDK S3 bucket calls in Scala or Java?

I've created an application using the Akka HTTP framework and Scala, that sends files to my S3 bucket using the SDK.

I'm trying to write unit and integration tests for the code and I am unsure about how to mock or stub these external calls, as it does not look like the SDK is making any obvious HTTP or WS calls.

Is there a library that can mock or stub S3 bucket calls, which is also compatible with Scala or Java?

Upvotes: 4

Views: 6373

Answers (1)

Pavel
Pavel

Reputation: 1539

You can try S3Mock, but you can create you own if you like

https://github.com/findify/s3mock

find section -> Scala with AWS S3 SDK:

Upvotes: 5

Related Questions