16
16
package com.amazon.opendistroforelasticsearch.alerting.util
17
17
18
18
import com.amazon.opendistroforelasticsearch.alerting.parser
19
- import org.elasticsearch.cluster.metadata.IndexMetaData
19
+ import org.elasticsearch.cluster.metadata.IndexMetadata
20
20
import org.elasticsearch.test.ESTestCase
21
21
import java.lang.NumberFormatException
22
22
import kotlin.test.assertFailsWith
@@ -66,7 +66,7 @@ class IndexUtilsTests : ESTestCase() {
66
66
" \" version\" :{\" created\" :\" 6040399\" },\" provided_name\" :\" data_test\" }},\" mapping_version\" :123," +
67
67
" \" settings_version\" :123,\" mappings\" :{\" _doc\" :{\" properties\" :{\" name\" :{\" type\" :\" keyword\" }}}}}}"
68
68
val newMapping = " {\" _meta\" :{\" schema_version\" :10},\" properties\" :{\" name\" :{\" type\" :\" keyword\" }}}"
69
- val index: IndexMetaData = IndexMetaData .fromXContent(parser(indexContent))
69
+ val index: IndexMetadata = IndexMetadata .fromXContent(parser(indexContent))
70
70
71
71
val shouldUpdateIndex = IndexUtils .shouldUpdateIndex(index, newMapping)
72
72
assertTrue(shouldUpdateIndex)
@@ -79,7 +79,7 @@ class IndexUtilsTests : ESTestCase() {
79
79
" \" settings_version\" :123,\" mappings\" :{\" _doc\" :{\" _meta\" :{\" schema_version\" :1},\" properties\" :" +
80
80
" {\" name\" :{\" type\" :\" keyword\" }}}}}}"
81
81
val newMapping = " {\" _meta\" :{\" schema_version\" :10},\" properties\" :{\" name\" :{\" type\" :\" keyword\" }}}"
82
- val index: IndexMetaData = IndexMetaData .fromXContent(parser(indexContent))
82
+ val index: IndexMetadata = IndexMetadata .fromXContent(parser(indexContent))
83
83
84
84
val shouldUpdateIndex = IndexUtils .shouldUpdateIndex(index, newMapping)
85
85
assertTrue(shouldUpdateIndex)
@@ -91,7 +91,7 @@ class IndexUtilsTests : ESTestCase() {
91
91
" \" version\" :{\" created\" :\" 6040399\" },\" provided_name\" :\" data_test\" }},\" mappings\" :" +
92
92
" {\" _doc\" :{\" _meta\" :{\" schema_version\" :1},\" properties\" :{\" name\" :{\" type\" :\" keyword\" }}}}}}"
93
93
val newMapping = " {\" _meta\" :{\" schema_version\" :1},\" properties\" :{\" name\" :{\" type\" :\" keyword\" }}}"
94
- val index: IndexMetaData = IndexMetaData .fromXContent(parser(indexContent))
94
+ val index: IndexMetadata = IndexMetadata .fromXContent(parser(indexContent))
95
95
96
96
val shouldUpdateIndex = IndexUtils .shouldUpdateIndex(index, newMapping)
97
97
assertFalse(shouldUpdateIndex)
0 commit comments