Andrea Cosentino created CAMEL-26417:
----------------------------------------

             Summary: camel-openfga - add a health-check lifecycle test for 
OpenFgaSecurityPolicy
                 Key: CAMEL-26417
                 URL: https://issues.apache.org/jira/browse/CAMEL-26417
             Project: Camel
          Issue Type: Test
            Reporter: Andrea Cosentino


Found during a camel-openfga test-coverage review.

camel-opa has {{OpaSecurityPolicyHealthCheckLifecycleTest}}, asserting that the 
readiness check {{OpaSecurityPolicy}} registers follows the lifecycle of the 
routes it guards (CAMEL-24751): kept while any guarded route runs, removed once 
the last stops, restored when a route starts again, and not registered at all 
when {{healthCheckEnabled=false}}.

{{OpenFgaSecurityPolicy}} implements exactly the same lifecycle - 
{{onProcessorStart}}/{{onProcessorStop}} ref-count the guarded routes and 
unregister the check on the last stop (CAMEL-24751) - but camel-openfga has no 
equivalent test. 
{{OpenFgaSecurityPolicyTest.registersAReadinessCheckOnlyForAClientItBuiltItself}}
 only asserts that an injected client registers no check; it never exercises 
register-on-start, keep-while-any-route-runs, unregister-on-last-stop, 
restore-on-restart, or the {{healthCheckEnabled=false}} guard.

Add {{OpenFgaSecurityPolicyHealthCheckLifecycleTest}} mirroring the camel-opa 
one. Test-only; no production change.

_Claude Code on behalf of oscerd_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to