[tests] Support mocking AWS API calls for integration tests
exdx opened this issue · 0 comments
exdx commented
It is difficult to test tools that create extensive amounts of cloud resources during their execution. One possible way is to do the following:
- Isolate all calls to the cloud provider API to a single struct and its
impl
- Create a mock struct that can issue mock results during tests
- Write tests using the mock
This approach has the added benefit of making it simpler to add another cloud provider, since the one singular struct will have all the cloud operations that need to be implemented to add a new cloud provider.
Since this is a really large task this is more of an exploratory issue. The overall goal is to improve test coverage for important commands.