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:
java.io.Closeable
,java.lang.AutoCloseable
public final class ClientYamlDocsTestClient extends ClientYamlTestClient
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
Constructors Constructor Description ClientYamlDocsTestClient(ClientYamlSuiteRestSpec restSpec, org.elasticsearch.client.RestClient restClient, java.util.List<org.apache.http.HttpHost> hosts, org.elasticsearch.Version esVersion, org.elasticsearch.Version masterVersion, java.lang.String os, org.elasticsearch.common.CheckedSupplier<org.elasticsearch.client.RestClientBuilder,java.io.IOException> clientBuilderWithSniffedNodes)
-
Method Summary
Modifier and Type Method Description ClientYamlTestResponse
callApi(java.lang.String apiName, java.util.Map<java.lang.String,java.lang.String> params, org.apache.http.HttpEntity entity, java.util.Map<java.lang.String,java.lang.String> headers, org.elasticsearch.client.NodeSelector nodeSelector)
Calls an api with the provided parameters and bodyMethods inherited from class org.elasticsearch.test.rest.yaml.ClientYamlTestClient
close, getEsVersion, getMasterVersion, getOs, getRestClient, setOptions
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ClientYamlDocsTestClient
public ClientYamlDocsTestClient(ClientYamlSuiteRestSpec restSpec, org.elasticsearch.client.RestClient restClient, java.util.List<org.apache.http.HttpHost> hosts, org.elasticsearch.Version esVersion, org.elasticsearch.Version masterVersion, java.lang.String os, org.elasticsearch.common.CheckedSupplier<org.elasticsearch.client.RestClientBuilder,java.io.IOException> clientBuilderWithSniffedNodes)
-
-
Method Details
-
callApi
public ClientYamlTestResponse callApi(java.lang.String apiName, java.util.Map<java.lang.String,java.lang.String> params, org.apache.http.HttpEntity entity, java.util.Map<java.lang.String,java.lang.String> headers, org.elasticsearch.client.NodeSelector nodeSelector) throws java.io.IOExceptionDescription copied from class:ClientYamlTestClient
Calls an api with the provided parameters and body- Overrides:
callApi
in classClientYamlTestClient
- Throws:
java.io.IOException
-