-
Notifications
You must be signed in to change notification settings - Fork 350
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
lambda - Fix flaky integration tests which assume there are no other functions in the account #1279
lambda - Fix flaky integration tests which assume there are no other functions in the account #1279
Conversation
…nctions in the account
Issue was introduced by ansible-collections/community.aws#1239 - the dict of dicts was deprecated for consistency with other modules. We probably need to do something clever with selectattr :/ |
I've changed the tests to use But the assert |
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
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.
I think the "defined" issue you're seeing is caused by testing against lambda_infos_all
rather than lambda_infos_query_config
I have a slight preference for using a temporary variable when using something so complex to access a list/dict item, but changing that's certainly not a blocker.
Thanks for the fix. |
Backport to stable-5: 💚 backport PR created✅ Backport PR branch: Backported as #1289 🤖 @patchback |
…functions in the account (#1279) lambda - Fix flaky integration tests which assume there are no other functions in the account SUMMARY The integration tests for lambda assume that there are no other lambdas in the account. So when we index into [0], that's not necessarily the lambda we just created. Note that this fix doesn't work. One of the assertions is failing. TASK [lambda : lambda_info | Assert successfull retrieval of all information 2] *** fatal: [testhost]: FAILED! => { "assertion": "lambda_infos_all.function[lambda_function_name].versions is not defined", "changed": false, "evaluated_to": false, "msg": "Assertion failed" } That attribute is defined. It's a list of 2 versions. I don't know why. I'm just creating this PR anyway, so someone else can pickup where I left off. ISSUE TYPE Bugfix Pull Request COMPONENT NAME lambda_info ADDITIONAL INFORMATION Fixes #1277 Reviewed-by: Mark Chappell <None> Reviewed-by: Matthew Davis <None> (cherry picked from commit 737ee75)
…functions in the account (#1279) (#1289) [PR #1279/737ee750 backport][stable-5] lambda - Fix flaky integration tests which assume there are no other functions in the account This is a backport of PR #1279 as merged into main (737ee75). SUMMARY The integration tests for lambda assume that there are no other lambdas in the account. So when we index into [0], that's not necessarily the lambda we just created. Note that this fix doesn't work. One of the assertions is failing. TASK [lambda : lambda_info | Assert successfull retrieval of all information 2] *** fatal: [testhost]: FAILED! => { "assertion": "lambda_infos_all.function[lambda_function_name].versions is not defined", "changed": false, "evaluated_to": false, "msg": "Assertion failed" } That attribute is defined. It's a list of 2 versions. I don't know why. I'm just creating this PR anyway, so someone else can pickup where I left off. ISSUE TYPE Bugfix Pull Request COMPONENT NAME lambda_info ADDITIONAL INFORMATION Fixes #1277
SUMMARY
The integration tests for lambda assume that there are no other lambdas in the account.
So when we index into
[0]
, that's not necessarily the lambda we just created.Note that this fix doesn't work. One of the assertions is failing.
That attribute is defined. It's a list of 2 versions. I don't know why.
I'm just creating this PR anyway, so someone else can pickup where I left off.
ISSUE TYPE
COMPONENT NAME
lambda_info
ADDITIONAL INFORMATION
Fixes #1277