3 ms·
I prefer mocking my AWS calls, so much more lightweight and means exert developer doesn’t have to install local stack
by surfer7837 5y ago
I prefer mocking my AWS calls, so much more lightweight and means exert developer doesn’t have to install local stack
- whummer 5y agoInteresting! Staying lightweight and zero-dependency is certainly a good argument. Out of curiosity - which programming language(s) are you / your team developing in? Do you have a notion of how much (%) of your time, approximately, goes into maintaining the mocks - does it scale / pay off over time?
- qaq 5y agoWell if they use https://github.com/spulec/moto https://github.com/spulec/moto they don't have to maintain the mocks
- deleted 5y ago[deleted]
- surfer7837 5y agoWe use Typescript and jest for the mocks. Probably about 10%, they’re very simple mocks, all they do is return success and in a few unit tests we make them return failure and then test how our app responds. I can’t really say if it pays off but it has caught some issues, would like to expand them more and implement more logic in then to check arguments etc but haven’t been able to yet. This article is similar to what we’ve done https://dev.to/elthrasher/mocking-aws-with-jest-and-typescript-199i https://dev.to/elthrasher/mocking-aws-with-jest-and-typescri... We also have a pipeline that does e2 work tests and canary releases to hopefully limit the blast radius. If we encounter >10 errors in a 1 minute period we roll back and the team are alerted
- itake 5y agoDo you mock for local dev too?
- jpgvm 5y agoI do. But I also primarily use JVM which means either high quality mocks are already available or it's easy to mock them out using Mockito or creating a fake implementation if I want.