Skip to content

Add unit tests for SingleSignOutHandler and AuthenticationFilter#1139

Open
vasiliy-mikhailov wants to merge 1 commit into
apereo:masterfrom
vasiliy-mikhailov:tests/sso-handler-auth-filter
Open

Add unit tests for SingleSignOutHandler and AuthenticationFilter#1139
vasiliy-mikhailov wants to merge 1 commit into
apereo:masterfrom
vasiliy-mikhailov:tests/sso-handler-auth-filter

Conversation

@vasiliy-mikhailov

@vasiliy-mikhailov vasiliy-mikhailov commented Jun 27, 2026

Copy link
Copy Markdown

This adds unit tests covering previously-untested branches and edge cases in two cas-client-core classes. No production code is changed.

SingleSignOutHandler (+28 tests): constructor defaults, init idempotency and safe-parameter handling, logout detection across HTTP methods and content types (multipart casing, JSONP callback), session destruction with blank or absent tokens, and decompression edge cases.

AuthenticationFilter (+29 tests): filter-chain invocation with and without a ticket, renew and gateway combinations, redirect behavior when no ticket or assertion is present, ignore-pattern matching, and initialization variants.

All cas-client-core tests pass: mvn -pl cas-client-core test on JDK 21.


How this was produced

This PR was generated with an AI-assisted pipeline built around mutation testing (PIT). The pipeline mutates the target class (flipping conditions and changing boundary/edge cases) and runs the existing tests against each mutant. Where a mutant survives (the existing tests do not catch that edge case), it writes a focused test for that case and reruns PIT to confirm the new test actually kills that specific mutant. So every added test is verified to catch a concrete edge case the suite missed before, rather than being speculative or redundant. The change is additive only (no production code modified), and the module builds green under its CI JDK.

@vasiliy-mikhailov
vasiliy-mikhailov force-pushed the tests/sso-handler-auth-filter branch from 2caf6c7 to bd6587c Compare June 27, 2026 07:44
Cover previously-untested branches and edge cases in two cas-client-core
classes. No production code changes.

Signed-off-by: Vasiliy Mikhailov <vasiliy.mikhailov@gmail.com>
@vasiliy-mikhailov
vasiliy-mikhailov force-pushed the tests/sso-handler-auth-filter branch from bd6587c to fb6557f Compare June 27, 2026 07:46
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.

1 participant