Package org.elasticsearch.test.rest.yaml
Class ClientYamlTestClient
java.lang.Object
org.elasticsearch.test.rest.yaml.ClientYamlTestClient
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
ClientYamlDocsTestClient,ImpersonateOfficialClientTestClient
Used by
ESClientYamlSuiteTestCase to execute REST requests according to the tests written in yaml suite files. Wraps a
RestClient instance used to send the REST requests. Holds the ClientYamlSuiteRestSpec used to translate api calls into
REST calls.-
Method Summary
Modifier and TypeMethodDescriptioncallApi(String apiName, Map<String, String> params, org.apache.http.HttpEntity entity, Map<String, String> headers, NodeSelector nodeSelector, BiPredicate<ClientYamlSuiteRestApi, ClientYamlSuiteRestApi.Path> pathPredicate) Calls an api with the provided parameters and bodyvoidclose()protected RestClientgetRestClient(NodeSelector nodeSelector) protected static voidsetOptions(Request request, Map<String, String> headers)
-
Method Details
-
callApi
public ClientYamlTestResponse callApi(String apiName, Map<String, String> params, org.apache.http.HttpEntity entity, Map<String, throws IOExceptionString> headers, NodeSelector nodeSelector, BiPredicate<ClientYamlSuiteRestApi, ClientYamlSuiteRestApi.Path> pathPredicate) Calls an api with the provided parameters and body- Throws:
IOException
-
getRestClient
-
setOptions
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-