Adapt to yaml test client upstream changes (elastic/x-pack-elasticsearch#2172)
Original commit: elastic/x-pack-elasticsearch@c4904823220cf09cad4a5b88c855f5a0d3094b5a
@@ -7,16 +7,21 @@ package org.elasticsearch.smoketest;
import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
-
+import org.elasticsearch.Version;
+import org.elasticsearch.client.RestClient;
+import org.elasticsearch.client.http.HttpHost;
import org.elasticsearch.common.settings.SecureString;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
+import org.elasticsearch.test.rest.yaml.ClientYamlDocsTestClient;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
+import org.elasticsearch.test.rest.yaml.ClientYamlTestClient;
import org.elasticsearch.test.rest.yaml.ClientYamlTestResponse;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
+import org.elasticsearch.test.rest.yaml.restspec.ClientYamlSuiteRestSpec;
import org.junit.After;
-
+import java.io.IOException;
import java.util.List;
import java.util.Map;
@@ -52,6 +57,12 @@ public class XDocsClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
return true;
}
+ @Override
+ protected ClientYamlTestClient initClientYamlTestClient(ClientYamlSuiteRestSpec restSpec, RestClient restClient,
+ List<HttpHost> hosts, Version esVersion) throws IOException {
+ return new ClientYamlDocsTestClient(restSpec, restClient, hosts, esVersion);
+ }
+
/**
* All tests run as a an administrative user but use <code>es-shield-runas-user</code> to become a less privileged user.
*/
