-
Notifications
You must be signed in to change notification settings - Fork 251
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(aws-eventbridge-sns , aws-events-rule-sns, aws-events-rule-lambda): custom event bus support #362
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
test('check eventbus property', () => { | ||
const stack = new cdk.Stack(); | ||
|
||
const construct: EventbridgeToSns = deployStackWithNewEventBus(stack); |
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.
deployStackWithNewEventBus() takes no parameters, it always deploys an identical stack. We have 3 tests that deploy this identical stack and check some aspect of it.
Why don't we have 1 test that deploys the stack and then do all the checks in that test?
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.
makes sense, will update it
@@ -33,6 +33,23 @@ function deployNewFunc(stack: cdk.Stack) { | |||
return new EventsRuleToLambda(stack, 'test-events-rule-lambda', props); | |||
} | |||
|
|||
function deployNewEventBus(stack: cdk.Stack) { |
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.
Same question about multiple tests here (and retroactively to eventbridge-lambda)
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.
will update the PR
runtime: lambda.Runtime.NODEJS_12_X, | ||
handler: 'index.handler' | ||
}, | ||
existingEventBusInterface: existingEventBus, |
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 like this better than
existingEventBusInterface: new events;EventBus(stack, 'existing-event-bus');
that we saw earlier. While they are functionally the same, this one emphasizes that it's using an event bus created independently of the larger construct.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Issue #, if available:
Description of changes:
aws-eventbridge-sns - Custom EventBus support
aws-events-rule-sns - Custom EventBus support
aws-events-rule-lambda - Custom EventBus support
aws-eventbridge-lambda - used semicolon(;) consistently in interface declaration
core/eventbridge-helper.ts - used semicolon(;) consistently in interface declaration
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.