[TEST] remove usage of deprecated apis
Original commit: elastic/x-pack-elasticsearch@4f4af3f5c5
This commit is contained in:
parent
ad9a64e854
commit
601169833b
|
@ -80,7 +80,7 @@ public class PkiOptionalClientAuthTests extends ShieldIntegTestCase {
|
|||
}
|
||||
|
||||
public void testRestClientWithoutClientCertificate() throws Exception {
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setSslcontext(getSSLContext()).build();
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setSSLContext(getSSLContext()).build();
|
||||
try (RestClient restClient = restClient(httpClient, "https")) {
|
||||
try {
|
||||
restClient.performRequest("GET", "_nodes", Collections.emptyMap(), null);
|
||||
|
|
|
@ -79,7 +79,7 @@ public class PkiWithoutClientAuthenticationTests extends ShieldIntegTestCase {
|
|||
public void testThatHttpWorks() throws Exception {
|
||||
SSLContext sc = SSLContext.getInstance("SSL");
|
||||
sc.init(null, trustAllCerts, new SecureRandom());
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setSslcontext(sc).build();
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setSSLContext(sc).build();
|
||||
try (RestClient restClient = restClient(httpClient, "https")) {
|
||||
try (ElasticsearchResponse response = restClient.performRequest("GET", "/_nodes", Collections.emptyMap(), null,
|
||||
new BasicHeader(UsernamePasswordToken.BASIC_AUTH_HEADER,
|
||||
|
|
Loading…
Reference in New Issue