-
Notifications
You must be signed in to change notification settings - Fork 4k
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(cloudtrail): user specified log group #8079
Conversation
Allow for users to set their own log group that CloudTrail must send events to. Expose a log group instance property that returns the user specified or auto-created log group. closes #6162
sendToCloudWatchLogs: true, | ||
}); | ||
|
||
test.ok(t.logGroup); | ||
test.deepEqual(stack.resolve(t.logGroup!.logGroupArn), { 'Fn::GetAtt': ['MyAmazingCloudTrailLogGroup2BE67F87', 'Arn'] }); |
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.
how come !.
- @eladb had mentioned in another PR that we generally try to avoid it in our codebase. Although this is a test, I think we should try and be consistent if it's a style we generally don't prefer
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 test verifies that t.logGroup
is not undefined
and returns an ARN (vs. the other case where it returns undefined
).
How should I update my assertions?
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.
unfortunately, something a little more naive - here's the similar example in the PR i mentioned
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.
Sorry, I'm not following what the change you're expecting here is. The unit testing in the linked PR is testing something quite different from what I'm trying to here.
Can you tell me what's wrong with the current assertion, and how you would write it?
I can either assert for it being not undefined
or for the value it returns. I've chosen the latter. Is there a 3rd option?
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'd do the former, but I'm not picky on this. go for it!
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Co-authored-by: Shiv Lakshminarayan <shivlaks@amazon.com>
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 |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
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 |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Allow for users to set their own log group that CloudTrail must send events to. Expose a log group instance property that returns the user specified or auto-created log group. closes aws#6162 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Allow for users to set their own log group that CloudTrail must send
events to.
Expose a log group instance property that returns the user specified or
auto-created log group.
closes #6162
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license