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

tests: head routes get applied rate limiting hook only once #267

Merged
merged 4 commits into from
Sep 30, 2022

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Sep 14, 2022

There was a bug in fastify core, where an onRoute hook would be called twice on automatic generated HEAD routes. This was fixed in core. This PR fixes unit tests and adds one regarding the expected behaviour.

Checklist

@Eomm
Copy link
Member

Eomm commented Sep 25, 2022

Can this pr go further now?

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Sep 25, 2022

@Eomm
No. This PR is actually just about adding a unit test and patch a unit test. Once fastify 4.6.1 is released we can and must apply this PR.
But as long 4.6.0 of fastify is highest version this PR has to wait.

@Uzlopak Uzlopak marked this pull request as ready for review September 30, 2022 20:05
@Uzlopak Uzlopak changed the title dont set the rate limiter twice on the head route tests: head routes get applied rate limiting hook only once Sep 30, 2022
Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@Uzlopak Uzlopak merged commit d0ba07e into master Sep 30, 2022
@Uzlopak Uzlopak deleted the double-head-route branch September 30, 2022 20:21
@Uzlopak
Copy link
Contributor Author

Uzlopak commented Sep 30, 2022

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants