The health check code implemented in #62 was developed before the common library added health check functionality. The main goal of this ticket is to remove the local health check implementation and use the library code in its place.
Additionally, as the existing end points are not known to be in use, and both check the health of the same index, a new /healthcheck/status endpoint should be created and the old /drugs/status and /autosuggest/status endpoints should redirect to the new one.
ESTIMATE TBD
What's the expected change?
Scenario: The old drug status endpoint forwards to the new health check.
* configure followRedirects = false
Given path 'drugs', 'status'
When method get
Then status 301
And match responseHeaders['Location'][0] == '/healthcheck/status'
Scenario: The old autosuggest status endpoint forwards to the new health check.
* configure followRedirects = false
Given path 'autosuggest', 'status'
When method get
Then status 301
And match responseHeaders['Location'][0] == '/healthcheck/status'
Scenario: The health check responds "alive!" if the index is loaded and healthy.
Given path 'HealthCheck', 'status'
When method get
Then status 200
And match response == 'alive!'
What's the current functionality?
Under normal circumstances, the route /drugs/status will return status 200 and the text alive!.
Under normal circumstances, the route /autosuggest/status will return status 200 and the text alive!.
Issue description
The health check code implemented in #62 was developed before the common library added health check functionality. The main goal of this ticket is to remove the local health check implementation and use the library code in its place.
Additionally, as the existing end points are not known to be in use, and both check the health of the same index, a new
/healthcheck/status
endpoint should be created and the old/drugs/status
and/autosuggest/status
endpoints should redirect to the new one.What's the expected change?
What's the current functionality?
/drugs/status
will return status 200 and the textalive!
./autosuggest/status
will return status 200 and the textalive!
.What's the updated acceptance criteria?
No change
Additional details / screenshot
Related Tickets