Class ClientYamlTestClient

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    ClientYamlDocsTestClient

    public class ClientYamlTestClient
    extends java.lang.Object
    implements java.io.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 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, NodeSelector nodeSelector)
      Calls an api with the provided parameters and body
      void close()  
      Version getEsVersion()  
      Version getMasterVersion()  
      protected RestClient getRestClient​(NodeSelector nodeSelector)  
      protected static void setOptions​(Request request, java.util.Map<java.lang.String,​java.lang.String> headers)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getEsVersion

        public Version getEsVersion()
      • getMasterVersion

        public Version getMasterVersion()
      • 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,
                                              NodeSelector nodeSelector)
                                       throws java.io.IOException
        Calls an api with the provided parameters and body
        Throws:
        java.io.IOException
      • setOptions

        protected static void setOptions​(Request request,
                                         java.util.Map<java.lang.String,​java.lang.String> headers)
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException