-
This unit test will delete document with not existing Index:
DELETE
call to the endpoint/api/notExistIndexDelete/_doc/1111
.- Using assert.Equal will test if the response code is equal to http.StatusBadRequest (i.e 400),that means test is OK.
-
This unit test will delete document with existing Index and not existing ID:
DELETE
call to the endpoint/api/"+indexName+"/_doc/notexist
.- Using assert.Equal will test if the response code is equal to http.OK (i.e 200),that means test is OK and document is deleted.
-
This unit test will delete document with existing Index and existing ID:
DELETE
call to the endpoint/api/"+indexName+"/_doc/1111
.- Using assert.Equal will test if the response code is equal to http.OK (i.e 200),that means test is OK and document is deleted.