Skip to content

Commit

Permalink
remove type from tests
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Walter Knize <[email protected]>
  • Loading branch information
nknize committed Mar 17, 2022
1 parent 82fd795 commit 71df6c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,31 +122,31 @@ public void testGlobalTemplatesDoNotApply() {
.indices()
.preparePutTemplate("a_global_template")
.setPatterns(Collections.singletonList("*"))
.setMapping("_doc", "foo", "type=text")
.setMapping("foo", "type=text")
.get()
);
assertAcked(
client().admin()
.indices()
.preparePutTemplate("not_global_template")
.setPatterns(Collections.singletonList("a*"))
.setMapping("_doc", "bar", "type=text")
.setMapping("bar", "type=text")
.get()
);
assertAcked(
client().admin()
.indices()
.preparePutTemplate("specific_template")
.setPatterns(Collections.singletonList("a_hidden_index"))
.setMapping("_doc", "baz", "type=text")
.setMapping("baz", "type=text")
.get()
);
assertAcked(
client().admin()
.indices()
.preparePutTemplate("unused_template")
.setPatterns(Collections.singletonList("not_used"))
.setMapping("_doc", "foobar", "type=text")
.setMapping("foobar", "type=text")
.get()
);

Expand Down Expand Up @@ -192,7 +192,7 @@ public void testNonGlobalTemplateCanMakeIndexHidden() {
.indices()
.preparePutTemplate("a_global_template")
.setPatterns(Collections.singletonList("my_hidden_pattern*"))
.setMapping("_doc", "foo", "type=text")
.setMapping("foo", "type=text")
.setSettings(Settings.builder().put("index.hidden", true).build())
.get()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ public void testIndexTemplateWithAliases() throws Exception {
.indices()
.preparePutTemplate("template_with_aliases")
.setPatterns(Collections.singletonList("te*"))
.setMapping("_doc", "type", "type=keyword", "field", "type=text")
.setMapping("type", "type=keyword", "field", "type=text")
.addAlias(new Alias("simple_alias"))
.addAlias(new Alias("templated_alias-{index}"))
.addAlias(new Alias("filtered_alias").filter("{\"term\":{\"type\":\"type2\"}}"))
Expand Down Expand Up @@ -820,7 +820,7 @@ public void testStrictAliasParsingInIndicesCreatedViaTemplates() throws Exceptio
.preparePutTemplate("template1")
.setPatterns(Collections.singletonList("a*"))
.setOrder(0)
.setMapping("test", "field", "type=text")
.setMapping("field", "type=text")
.addAlias(new Alias("alias1").filter(termQuery("field", "value")))
.get();
// Indexing into b index should fail, since there is field with name 'field' in the mapping
Expand Down Expand Up @@ -930,7 +930,7 @@ public void testOrderAndVersion() {
.setPatterns(Collections.singletonList("te*"))
.setVersion(version)
.setOrder(order)
.setMapping("test", "field", "type=text")
.setMapping("field", "type=text")
.get()
);

Expand Down

0 comments on commit 71df6c0

Please sign in to comment.