-
Notifications
You must be signed in to change notification settings - Fork 283
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: overhaul connector tests #3138
Conversation
81904f6
to
cf3952b
Compare
Pull Request Test Coverage Report for Build 480958776
💛 - Coveralls |
25d193f
to
c2f71c1
Compare
c2f71c1
to
bc269cb
Compare
bc269cb
to
35593c3
Compare
@@ -0,0 +1,127 @@ | |||
// Copyright (c) Microsoft Corporation. |
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 magically allows us to fully stub JWT in the tests.
@@ -0,0 +1,65 @@ | |||
// Copyright (c) Microsoft Corporation. |
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.
And this the Oauth flow, including fully signed and verifiable JWTs (using the above stub).
09c8bf3
to
73cf9ce
Compare
63aa200
to
f4e6f76
Compare
f4e6f76
to
172354e
Compare
ac376b3
to
1216a29
Compare
c0a9476
to
cb0a5f8
Compare
- provide oauth/jwt stub helpers in new test utils package - expand jwt token validation tests - reorg existing auth tests - remove unnecessary `assertExt` helpers. - JSDoc cleanup, code formatting, etc.
cb0a5f8
to
600c059
Compare
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 looks very solid. Should this PR be crosslinked with microsoft/botframework-sdk#5977 for the new botbuilder-test-utils nock
-ing code?
assertExt
helpers.The bulk of this work is to protect me from inadvertent bugs caused by the incoming
CloudAdapter
port work. In particular, having a way to stub and test JWT/Oauth end-to-end with full signature verification is handy.