WW-5535 test(core): cover wildcard-resolved unannotated methods via real proxy#1692
Merged
Merged
Conversation
…eal proxy Closes the test gap noted in the WW-5535 research: no integration test exercised HttpMethodInterceptor against a real DefaultActionProxy resolving a wildcard action with an unannotated method. Uses xwork-test-allowed-methods.xml's existing <action name="Wild-*" method="{1}"> on HttpMethodsTestAction. URL "Wild-execute" resolves to ActionSupport.execute() (no method-level HTTP annotation); the class-level @AllowedHttpMethod(POST) must still reject GET end-to-end. Together with the prior MockActionProxy regression tests, this locks in both halves of the fix: - DefaultActionProxy.resolveMethod() sets isMethodSpecified()=true for wildcard-resolved methods (WW-5535 / #1592) - HttpMethodInterceptor falls back to class-level annotations when the resolved method is unannotated (#1690)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Closes the integration test gap identified in the WW-5535 research: no test exercised
HttpMethodInterceptoragainst a realDefaultActionProxyresolving a wildcard action with an unannotated method.Together with the existing
MockActionProxy-based regression tests, this locks in both halves of the fix:DefaultActionProxy.resolveMethod()setsisMethodSpecified()=truefor wildcard-resolved methods — WW-5535 / WW-5535 Fix HttpMethodInterceptor with wildcard action names #1592HttpMethodInterceptorfalls back to class-level annotations when the resolved method is unannotated — fix(core): enforce class-level HTTP method annotations for wildcard-resolved unannotated methods #1690What the test does
Uses the existing
xwork-test-allowed-methods.xml:HttpMethodsTestActioncarries class-level@AllowedHttpMethod(POST). URLWild-executeresolves toActionSupport.execute()— no method-level HTTP annotation. The integration test:actionProxyFactory.createActionProxy("", "Wild-execute", null, ...)proxy.getMethod() == "execute"andproxy.isMethodSpecified() == true(sanity-checks the WW-5535 wiring)HttpMethodInterceptoragainstproxy.getInvocation()with a GET requestbad-request— class-level annotation still enforcedOnly the negative (GET) case is covered: it returns before
invocation.invoke(), so the test stays a focused integration check without dragging the whole interceptor stack in. The positive POST counterpart is already covered by the unit tests added in #1690.Fixes WW-5535 test gap.
Test plan