Switch non-x-pack to new style requests (#32106)

In #29623 we added `Request` object flavored requests to the low level
REST client and in #30315 we deprecated the old `performRequest`s. This
changes most of the calls not in X-Pack to their new versions.
This commit is contained in:
Nik Everett 2018-07-16 17:44:19 -04:00 committed by GitHub
parent 791b9b147c
commit d596447f3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 33 deletions

View file

@ -20,6 +20,7 @@
package org.elasticsearch.qa.verify_version_constants;
import org.elasticsearch.Version;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.yaml.ObjectPath;
@ -32,7 +33,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
public class VerifyVersionConstantsIT extends ESRestTestCase {
public void testLuceneVersionConstant() throws IOException, ParseException {
final Response response = client().performRequest("GET", "/");
final Response response = client().performRequest(new Request("GET", "/"));
assertThat(response.getStatusLine().getStatusCode(), equalTo(200));
final ObjectPath objectPath = ObjectPath.createFromResponse(response);
final String elasticsearchVersionString = objectPath.evaluate("version.number").toString();