From 0a6a48b91bd8274c101bf9fb97de88a05007c95c Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Thu, 2 Aug 2018 15:27:02 -0600 Subject: [PATCH] [TEST] Fix HLRC using pre-rename endpoint for setting lifecycle policy --- .../main/java/org/elasticsearch/client/RequestConverters.java | 2 +- .../java/org/elasticsearch/client/RequestConvertersTests.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/RequestConverters.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/RequestConverters.java index 728d304077f..df423b8b5ec 100644 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/RequestConverters.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/RequestConverters.java @@ -1159,7 +1159,7 @@ final class RequestConverters { Request request = new Request(HttpPut.METHOD_NAME, new EndpointBuilder() .addCommaSeparatedPathParts(indices) - .addPathPartAsIs("_lifecycle") + .addPathPartAsIs("_ilm") .addPathPart(setPolicyRequest.policy()) .build()); Params params = new Params(request); diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestConvertersTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestConvertersTests.java index 0be12e8cebe..6028dc3c783 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestConvertersTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/RequestConvertersTests.java @@ -2597,7 +2597,7 @@ public class RequestConvertersTests extends ESTestCase { String idxString = Strings.arrayToCommaDelimitedString(indices); assertThat(request.getEndpoint(), equalTo("/" + (idxString.isEmpty() ? "" : (idxString + "/")) + - "_lifecycle/" + policyName)); + "_ilm/" + policyName)); assertThat(request.getParameters(), equalTo(expectedParams)); }