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 API Gateway): Allow use of custom authorizer with authorizerId #10384
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10384 +/- ##
=======================================
Coverage 85.37% 85.37%
=======================================
Files 340 340
Lines 14005 14005
=======================================
Hits 11957 11957
Misses 2048 2048
Continue to review full report at Codecov.
|
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.
Thanks @darksun, I have only one comment related to testing, please let me know what do you think
@@ -235,6 +235,52 @@ describe('#validate()', () => { | |||
expect(() => awsCompileApigEvents.validate()).not.to.throw(Error); | |||
}); | |||
|
|||
it('should throw when using a CUSTOM authorizer without an authorizer id', () => { |
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.
For a long time now we're only accepting new tests written with using runServerless
utility and are slowly migrating away from the old approach. Could you please cover it with such tests instead?
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.
No problem, sorry I had missed that earlier in the test README.
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.
Looks great, I only have minor remarks, please let me know what do you think
}, | ||
}, | ||
}, | ||
}).then(({ awsNaming: naming, cfTemplate }) => { |
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.
Let's use async/await
instead of then
@@ -235,6 +235,69 @@ describe('#validate()', () => { | |||
expect(() => awsCompileApigEvents.validate()).not.to.throw(Error); | |||
}); | |||
|
|||
it('should throw when using a CUSTOM authorizer without an authorizer id', async () => { |
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.
Let's move these two tests into the second describe
at the bottom of the file that has only runServerless
based tests
Rebased with master to get the coverage report to pass. |
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.
Thank you @darksun, well done 👍
Closes: #8769