Skip to content

BUG: Dual Behavior of Tests into Spring Boot MockMvc and Curl #33884

@ejpg-sys

Description

@ejpg-sys

The Spring Test Context Framework has a behavior analysis problem when given to test cases.

Ie.: With a Jakarta Servlet Filter implementation in Combination with Spring Boot Registration, into doFilter after a if/else, the chain should follow or be redirected. With this implementation and execution, with curl command line is possible check the behavior of authorization (ok/unathorized). But, if the same are executed with MockMvc, the filter is ignored and the Spring do more things against the initial resource lookup. So, in the first time, with curl the response are ok/unauthorized, but with MockMvc are ok/ok/bad_request/ok.

Regards!

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: stackoverflowA question that's better suited to stackoverflow.comstatus: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions