Add integration test to ensure the SavedObjectsRepository handles responses correctly #107246
Labels
Feature:Saved Objects
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
v7.16.0
v8.0.0
In #107104 we added functionality to determine if 404 responses are a result of saved object documents not being found or some other cause where the response can't be verified to have come from Elasticsearch.
As we implement the differentiation more broadly in all the repository calls to ES, we need to ensure the behavior is consistent.
Adding an integration test would be great but is not simple to do because we'd need to setup a proxy server in front of Elasticsearch that allows us to 'hi-jack' the response to test the condition.
Suggested Implementation
We should experiment with using a custom Hapi server with the
h2o2
pluging (the same one we use for the base path proxy).The text was updated successfully, but these errors were encountered: