Skip to content

Commit

Permalink
fixing testCamelCaseDeprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
masseyke committed Nov 12, 2024
1 parent ee7d420 commit 29b1be0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ public void testCamelCaseDeprecation() throws IOException {
.numberOfReplicas(1)
.putMapping(simpleMapping)
.build();
ClusterState clusterState = ClusterState.builder(ClusterState.EMPTY_STATE)
.metadata(Metadata.builder().put(simpleIndex, true))
.build();

DeprecationIssue expected = new DeprecationIssue(
DeprecationIssue.Level.CRITICAL,
Expand All @@ -244,10 +247,7 @@ public void testCamelCaseDeprecation() throws IOException {
false,
null
);
List<DeprecationIssue> issues = DeprecationChecks.filterChecks(
INDEX_SETTINGS_CHECKS,
c -> c.apply(simpleIndex, ClusterState.EMPTY_STATE)
);
List<DeprecationIssue> issues = DeprecationChecks.filterChecks(INDEX_SETTINGS_CHECKS, c -> c.apply(simpleIndex, clusterState));
assertThat(issues, hasItem(expected));
}
}

0 comments on commit 29b1be0

Please sign in to comment.