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
aws | missing launch template #4579
Conversation
Might have to put in a test case I guess. If this looks good @kapilt, I can get the tests in! Thanks |
approach looks fine wrt to api exception, but there's some additional behavior validation needed around the filter itself, ie if attribute equality check on launch template that doesn't exist shouldn't return results for non existent. also brings up the another question of how do you check for an asg with a non existent launch template version, ideally that would be handled by the |
Cool, I'll try to add those changes in! Thanks |
Hello @kapilt! I have added some code: |
needs some additional test coverage on the exception handling behavior, if you need an example of injecting clients with failures, patch or mock is appropriate, there are other resource tests doing the same. |
Thanks for your input! I'll get the test cases out such that the codecov goes up. Right now looks like its not respecting the test I wrote as per your suggestion. Update: For testing, used two (lt, lt-version) tuples. One of them doesn't exist. Passed the arguments through get_resources() in class LaunchTemplate. Even if one of them doesn't exist, the exception was handled and the results returned as expected. Thanks for your help! |
… into lt-missing
… into lt-missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, lgtm
Closes #4568
Added a try/except block around describe_launch_template_versions api call. Continues if the launch template is not found and raises in all other cases