Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] Support mocking AWS API calls for integration tests #388

Open
exdx opened this issue Jun 20, 2023 · 0 comments
Open

[tests] Support mocking AWS API calls for integration tests #388

exdx opened this issue Jun 20, 2023 · 0 comments
Labels

Comments

@exdx
Copy link
Contributor

exdx commented Jun 20, 2023

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.

@exdx exdx added the testing label Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant