Package org.elasticsearch.test.rest.yaml
Class ClientYamlDocsTestClient
java.lang.Object
org.elasticsearch.test.rest.yaml.ClientYamlTestClient
org.elasticsearch.test.rest.yaml.ClientYamlDocsTestClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
Used to execute REST requests according to the docs snippets that need to be tests. Wraps a
RestClient
instance used to send the REST requests. Holds the ClientYamlSuiteRestSpec
used to translate api calls into
REST calls. Supports raw requests besides the usual api calls based on the rest spec.-
Constructor Summary
ConstructorDescriptionClientYamlDocsTestClient
(ClientYamlSuiteRestSpec restSpec, RestClient restClient, List<org.apache.http.HttpHost> hosts, Version esVersion, Version masterVersion, String os, CheckedSupplier<RestClientBuilder, IOException> clientBuilderWithSniffedNodes) -
Method Summary
Methods inherited from class org.elasticsearch.test.rest.yaml.ClientYamlTestClient
close, getEsVersion, getMasterVersion, getOs, getRestClient, setOptions
-
Constructor Details
-
ClientYamlDocsTestClient
public ClientYamlDocsTestClient(ClientYamlSuiteRestSpec restSpec, RestClient restClient, List<org.apache.http.HttpHost> hosts, Version esVersion, Version masterVersion, String os, CheckedSupplier<RestClientBuilder, IOException> clientBuilderWithSniffedNodes)
-
-
Method Details
-
callApi
public ClientYamlTestResponse callApi(String apiName, Map<String, String> params, org.apache.http.HttpEntity entity, Map<String, throws IOExceptionString> headers, NodeSelector nodeSelector) Description copied from class:ClientYamlTestClient
Calls an api with the provided parameters and body- Overrides:
callApi
in classClientYamlTestClient
- Throws:
IOException
-