Skip to content

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

Merged
mastermatt merged 1 commit intonock:nextfrom
mastermatt:bug-unmocked-https
Aug 14, 2019
Merged

bug(overrider): unmocked HTTPS request with partial interceptor match#1664
mastermatt merged 1 commit intonock:nextfrom
mastermatt:bug-unmocked-https

Conversation

@mastermatt
Copy link
Copy Markdown
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 mastermatt requested a review from paulmelnikow August 8, 2019 16:47
@mastermatt
Copy link
Copy Markdown
Member Author

fyi @NatalieWolfe

@mastermatt
Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
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
Copy Markdown
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!

})
})

test('allow unmocked option works with https for a partial match', t => {
Copy link
Copy Markdown
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
Copy Markdown
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.
juninmd pushed a commit to juninmd/nock that referenced this pull request Mar 21, 2026
…nock#1664)

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.
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