-
-
Notifications
You must be signed in to change notification settings - Fork 345
feat: add lint and unit test workflow checks for pull requests #152
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
feat: add lint and unit test workflow checks for pull requests #152
Conversation
and it fails, fantastic 🎉! time to fix |
8397ea5
to
8f2d101
Compare
|
||
events = ( | ||
( | ||
{ |
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 threw me for a loop. some events are shown in the SNS event format thats delivered to the lambda when invoked, and others are in the raw message format (that would in theory be passed to something like aws sns publish --topic-arn "xxx" --message "<message>"
).
Its this 2nd format, the raw format, that had me scratching my head as to why this https://github.com/terraform-aws-modules/terraform-aws-notify-slack/blob/master/functions/notify_slack.py#L153 wasn't failing because they don't have an enclosing SNS event format with Records: []
. But the current tests don't test through the actual lambda handler, they short-circuit through this function https://github.com/terraform-aws-modules/terraform-aws-notify-slack/blob/master/functions/notify_slack.py#L101
…ws-notify-slack into feat/ci-unit-tests
f366e79
to
eca59be
Compare
# [4.22.0](v4.21.0...v4.22.0) (2021-12-10) ### Features * add lint and unit test workflow checks for pull requests ([#152](#152)) ([d2675ec](d2675ec))
This PR is included in version 4.22.0 🎉 |
Very nice! Glad to see some more improvements in this rather popular module. Thanks @bryantbiggs ! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
functions/messages/
, and JSON raw event message payloads are stored underfunctions/events/*
. SNS messages are what are currently trigger the lambda handler, but by having the raw events as well we can make developing and testing custom messages for new event types easier; in the end they are just stringified JSON payloads store din theMessage
attribute of the SNS message that triggers the functionslack-notify-simple
example has been updated to produce an environment variables file to aid in local integrations testingintegration_test.py
has been added to test the resources live (using the SNS topic and Lambda handler created by theslack-notify-simple
example project)Motivation and Context
Breaking Changes
How Has This Been Tested?
examples/*
projectspipenv run test
slack-notify-simple
project using my provided webhook URL and then ranpipenv run python integration_test.py