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

Align StandaloneMockMvcBuilder with trailing slash defaults #32796

Conversation

evan-mc
Copy link
Contributor

@evan-mc evan-mc commented May 11, 2024

Spring no longer supports trailing slashes by default, as of #28552. However, unit tests that are setup using the StandaloneMockMvcBuilder still have default support for trailing slashes. This causes an inconsistency that does not reflect what spring does by default. By changing the default to false, unit tests will accurately reflect the base implementation, which will cause less confusion when unit tests are working and production code is not.

@pivotal-cla
Copy link

@evan-mc Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@evan-mc Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label May 11, 2024
@sbrannen sbrannen added in: test Issues in the test module in: web Issues in web modules (web, webmvc, webflux, websocket) labels May 12, 2024
@sbrannen sbrannen changed the title Fix default value for trailing slash in StandaloneMockMvcBuilder.java Fix default value for trailing slash in StandaloneMockMvcBuilder May 12, 2024
@sbrannen
Copy link
Member

@rstoyanchev, what do you think about switching the default here?

@sbrannen sbrannen added the status: waiting-for-internal-feedback An issue that needs input from a member or another Spring Team label May 12, 2024
@rstoyanchev
Copy link
Contributor

Yes, it makes sense to align the default, but maybe in 6.2 only.

@rstoyanchev rstoyanchev removed status: waiting-for-triage An issue we've not yet triaged or decided on status: waiting-for-internal-feedback An issue that needs input from a member or another Spring Team labels May 13, 2024
@rstoyanchev rstoyanchev added this to the 6.2.0-M2 milestone May 13, 2024
@rstoyanchev rstoyanchev added the type: enhancement A general enhancement label May 13, 2024
@bclozel bclozel changed the title Fix default value for trailing slash in StandaloneMockMvcBuilder Align StandaloneMockMvcBuilder with trailing slash defaults May 14, 2024
@bclozel bclozel self-assigned this May 14, 2024
@bclozel bclozel closed this in 376d783 May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants