oscerd opened a new pull request, #28725:
URL: https://github.com/apache/camel/pull/28725

   This adds the test for 
[CAMEL-26417](https://issues.apache.org/jira/browse/CAMEL-26417).
   
   `OpenFgaSecurityPolicy` registers its OpenFGA readiness check from the 
guarded processors' lifecycle (`onProcessorStart`/`onProcessorStop`) and 
ref-counts the routes, so the check is kept while any guarded route runs, 
removed once the last stops, and restored when a route starts again — 
`beforeWrap` does not re-run on a plain restart (CAMEL-24751). camel-opa has 
`OpaSecurityPolicyHealthCheckLifecycleTest` for exactly this; camel-openfga had 
no equivalent (`OpenFgaSecurityPolicyTest` only asserts that an *injected* 
client registers no check).
   
   Adds `OpenFgaSecurityPolicyHealthCheckLifecycleTest`, mirroring the opa one:
   
   - `keepsTheCheckWhileAnyGuardedRouteRunsAndRestoresItOnRestart` — two routes 
share the policy; stopping one keeps the check, stopping the last removes it, 
starting one again restores it.
   - `doesNotRegisterACheckWhenHealthCheckIsDisabled` — a 
`healthCheckEnabled=false` policy on a started route registers nothing (a 
distinct apiUrl ensures a missing guard would surface as a second registration 
rather than dedup).
   
   Test-only; no production change. Full `camel-openfga` module build + tests 
green.
   
   _Claude Code on behalf of oscerd_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to