From b530da945d57fd97df6eb71ce4e59e0eaeb3a764 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Mon, 7 Aug 2017 11:02:25 +0200 Subject: [PATCH] Adapt to yaml test client upstream changes (elastic/x-pack-elasticsearch#2172) Original commit: elastic/x-pack-elasticsearch@d984f71801d8ea94348a12a1d4d20589950d903f --- .../smoketest/XDocsClientYamlTestSuiteIT.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java b/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java index ac70aa104fc..353afc6e9df 100644 --- a/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java +++ b/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java @@ -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 hosts, Version esVersion) throws IOException { + return new ClientYamlDocsTestClient(restSpec, restClient, hosts, esVersion); + } + /** * All tests run as a an administrative user but use es-shield-runas-user to become a less privileged user. */