-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add tests which verify EventBridge rules behavior #6124
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
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
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.
Welcome to LocalStack! Thanks for raising your first Pull Request and landing in your contributions. Our team will reach out with any reviews or feedbacks that we have shortly. We recommend joining our Slack Community and share your PR on the #community channel to share your contributions with us. Please make sure you are following our contributing guidelines and our Code of Conduct.
I have read the CLA Document and I hereby sign the CLA |
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.
Good job tackling such a fairly complex case (in terms of testing) this early on.
Only the f-strings and the waiting need to be fixed for the approval, otherwise it's mostly just some notes and explanations 👍
logs_client.delete_log_stream( | ||
logGroupName=log_group_name, logStreamName=log_stream["logStreamName"] | ||
) | ||
logs_client.delete_log_group(logGroupName=log_group_name) |
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.
This might actually be a good time to clean up the test_events.py
file and bring it up to date in terms of testing patterns in a separate PR if you're interested 👍
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.
small remark to the cleanup function (don't need to fix this): any exception in here will cause all cleanups afterwards to be skipped. This is mostly a problem when dealing with tests against AWS (e.g. when debugging). You'll be creating a lot of orphaned resources this way.
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.
minor nit regarding aggregating name generation in individual tests.
Otherwise LGTM 🥳 More parity coverage 📈
This PR adds three tests which verify correct behavior of EventBridge rules:
create rule
constraints align with those of aws