AzureCognitiveSearchMemoryStoreTests works by creating its own HttpPipeline for the SearchIndexAsyncClient. The individual tests can supply their own HttpResponse body, but this is not enough since there may be other REST APIs called from SearchIndexAsyncClient that the unit test does not handle. Additionally, the response bodies do not conform to the current API (api-version=2023-07-01-Preview) so the SearchIndexAsyncClient cannot deserialize the responses.
So, what I think needs to be done is to have broader handling of the requests, allowing the individual test to provide specific responses (as required) for the HTTP method and REST endpoint being invoked.
Was:
AzureCognitiveSearchMemory needs better unit test coverage, including negative tests, i.e., response is something other than HTTP 200.
AzureCognitiveSearchMemoryStoreTests works by creating its own HttpPipeline for the SearchIndexAsyncClient. The individual tests can supply their own HttpResponse body, but this is not enough since there may be other REST APIs called from SearchIndexAsyncClient that the unit test does not handle. Additionally, the response bodies do not conform to the current API (api-version=2023-07-01-Preview) so the SearchIndexAsyncClient cannot deserialize the responses.
So, what I think needs to be done is to have broader handling of the requests, allowing the individual test to provide specific responses (as required) for the HTTP method and REST endpoint being invoked.
Was:
AzureCognitiveSearchMemory needs better unit test coverage, including negative tests, i.e., response is something other than HTTP 200.