Skip to content
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

bug(overrider): unmocked HTTPS request with partial interceptor match #1664

Merged
merged 1 commit into from Aug 14, 2019

Conversation

mastermatt
Copy link
Member

Fixes: #1422

The allowUnmocked option is processed in two places. Once in the
intercept when there are no interceptors that come close to matching
the request. And again in the overrider when there are interceptors
that partially match, eg just path, but don't completely match.

This fixes and explicitly tests the later case in the overrider by
making an HTTPS request for a path that has an interceptor but fails to
match the query constraint.

Fixes: nock#1422

The `allowUnmocked` option is processed in two places. Once in the
intercept when there are no interceptors that come close to matching
the request. And again in the overrider when there are interceptors
that partially match, eg just path, but don't completely match.

This fixes and explicitly tests the later case in the overrider by
making an HTTPS request for a path that has an interceptor but fails to
match the query constraint.
@mastermatt
Copy link
Member Author

fyi @NatalieWolfe

@mastermatt
Copy link
Member Author

@paulmelnikow @gr2m can this get in before 11 publishes latest?

Copy link
Member

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@gr2m gr2m changed the base branch from beta to next August 14, 2019 18:44
@mastermatt mastermatt merged commit 870584b into nock:next Aug 14, 2019
@mastermatt mastermatt deleted the bug-unmocked-https branch August 14, 2019 18:53
Copy link
Member

@paulmelnikow paulmelnikow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, had a review started on this but looks like I didn't click the button.

Thanks for fixing this!

@@ -109,3 +109,38 @@ test('allow unmocked option works with https', t => {
.end()
})
})

test('allow unmocked option works with https for a partial match', t => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a link here to the issue?

@nockbot
Copy link
Collaborator

nockbot commented Aug 20, 2019

🎉 This PR is included in version 11.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

gr2m pushed a commit that referenced this pull request Sep 4, 2019
…#1664)

Fixes: #1422

The `allowUnmocked` option is processed in two places. Once in the
intercept when there are no interceptors that come close to matching
the request. And again in the overrider when there are interceptors
that partially match, eg just path, but don't completely match.

This fixes and explicitly tests the later case in the overrider by
making an HTTPS request for a path that has an interceptor but fails to
match the query constraint.
gr2m pushed a commit that referenced this pull request Sep 4, 2019
…#1664)

Fixes: #1422

The `allowUnmocked` option is processed in two places. Once in the
intercept when there are no interceptors that come close to matching
the request. And again in the overrider when there are interceptors
that partially match, eg just path, but don't completely match.

This fixes and explicitly tests the later case in the overrider by
making an HTTPS request for a path that has an interceptor but fails to
match the query constraint.
gr2m pushed a commit that referenced this pull request Sep 5, 2019
…#1664)

Fixes: #1422

The `allowUnmocked` option is processed in two places. Once in the
intercept when there are no interceptors that come close to matching
the request. And again in the overrider when there are interceptors
that partially match, eg just path, but don't completely match.

This fixes and explicitly tests the later case in the overrider by
making an HTTPS request for a path that has an interceptor but fails to
match the query constraint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allowUnmocked + https causes protocol error
4 participants