Fix PAP healthcheck response during failures 68/127668/2
authora.sreekumar <ajith.sreekumar@bell.ca>
Thu, 10 Mar 2022 17:56:48 +0000 (17:56 +0000)
committera.sreekumar <ajith.sreekumar@bell.ca>
Thu, 10 Mar 2022 18:24:22 +0000 (18:24 +0000)
commitd923d6792617e677da934836843d780cf44e52dc
treee0e708a17970f99ea8ce276b44706f61535b73e4
parentd4cbdf4a7e89c21810225a435234419b4346ac13
Fix PAP healthcheck response during failures

The healthcheck response that is returned by PAP is not inline with the
actual healthreport. Even when the report has
healthy:false, code:503, message:not alive
the response code stays 200. This is fixed, this also makes the improved
readiness probe in OOM to work properly with the healthcheck calls

Change-Id: Ib208e0a84bce74157aacbcad61a11dcf900c7c94
Issue-ID: POLICY-4030
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
main/src/main/java/org/onap/policy/pap/main/rest/HealthCheckRestControllerV1.java
main/src/test/java/org/onap/policy/pap/main/rest/TestHealthCheckRestControllerV1.java