Class ClientYamlTestClient

java.lang.Object
org.elasticsearch.test.rest.yaml.ClientYamlTestClient
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
ClientYamlDocsTestClient

public class ClientYamlTestClient extends Object implements Closeable
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 Details

    • getEsVersion

      public org.elasticsearch.Version getEsVersion()
    • getMasterVersion

      public org.elasticsearch.Version getMasterVersion()
    • getOs

      public String getOs()
    • callApi

      public ClientYamlTestResponse callApi(String apiName, Map<String,​String> params, org.apache.http.HttpEntity entity, Map<String,​String> headers, org.elasticsearch.client.NodeSelector nodeSelector) throws IOException
      Calls an api with the provided parameters and body
      Throws:
      IOException
    • getRestClient

      protected org.elasticsearch.client.RestClient getRestClient(org.elasticsearch.client.NodeSelector nodeSelector)
    • setOptions

      protected static void setOptions(org.elasticsearch.client.Request request, Map<String,​String> headers)
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException