NCIOCPL / drug-dictionary-api

NCI Drug Dictionary API
0 stars 3 forks source link

Remove redundant health check code. #88

Closed blairlearn closed 1 year ago

blairlearn commented 1 year ago

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.

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?

What's the updated acceptance criteria?

No change

Additional details / screenshot

Related Tickets