Skip to content

Commit

Permalink
Fix due to elastic#38189
Browse files Browse the repository at this point in the history
Updated 6.x test expectations
  • Loading branch information
markharwood committed Feb 4, 2019
1 parent 8ad5c0f commit cf8397b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1559,8 +1559,8 @@ public void testPutTemplateWithNoTypesUsingTypedApi() throws Exception {
assertThat(extractRawValues("my-template.index_patterns", templates), contains("pattern-1", "name-*"));
assertThat(extractValue("my-template.settings.index.number_of_shards", templates), equalTo("3"));
assertThat(extractValue("my-template.settings.index.number_of_replicas", templates), equalTo("0"));
assertThat(extractValue("my-template.mappings.properties.host_name.type", templates), equalTo("keyword"));
assertThat(extractValue("my-template.mappings.properties.description.type", templates), equalTo("text"));
assertThat(extractValue("my-template.mappings.my_doc_type.properties.host_name.type", templates), equalTo("keyword"));
assertThat(extractValue("my-template.mappings.my_doc_type.properties.description.type", templates), equalTo("text"));
assertThat((Map<String, String>) extractValue("my-template.aliases.alias-1", templates), hasEntry("index_routing", "abc"));
assertThat((Map<String, String>) extractValue("my-template.aliases.{index}-write", templates), hasEntry("search_routing", "xyz"));
}
Expand Down Expand Up @@ -1660,8 +1660,7 @@ public void testCRUDIndexTemplateWithTypes() throws Exception {
//Check the typed version of the call
org.elasticsearch.action.admin.indices.template.get.GetIndexTemplatesResponse getTemplate2 =
execute(new GetIndexTemplatesRequest("template-2"),
client.indices()::getTemplate, client.indices()::getTemplateAsync,
expectWarnings(RestGetIndexTemplateAction.TYPES_DEPRECATION_MESSAGE));
client.indices()::getTemplate, client.indices()::getTemplateAsync);
assertThat(getTemplate2.getIndexTemplates(), hasSize(1));
org.elasticsearch.cluster.metadata.IndexTemplateMetaData template2 = getTemplate2.getIndexTemplates().get(0);
assertThat(template2.name(), equalTo("template-2"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class RestPutIndexTemplateAction extends BaseRestHandler {
private static final DeprecationLogger DEPRECATION_LOGGER = new DeprecationLogger(
LogManager.getLogger(RestPutIndexTemplateAction.class));
public static final String TYPES_DEPRECATION_MESSAGE = "[types removal] Specifying types in put index " +
"template requests is deprecated. Any doc types should be removed from the \"mapping\" section"
"template requests is deprecated. Any doc types should be removed from the `mapping` section"
+ " and the parameter include_type_name should be provided and set to false to be " +
"compatible with the next major version.";

Expand Down

0 comments on commit cf8397b

Please sign in to comment.