mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 01:22:26 -04:00
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:
parent
791b9b147c
commit
d596447f3d
4 changed files with 39 additions and 33 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue