|
18 | 18 | public class ClusterDeprecationChecksTests extends ESTestCase {
|
19 | 19 |
|
20 | 20 | public void testCheckTransientSettingsExistence() {
|
| 21 | + Settings persistentSettings = Settings.builder() |
| 22 | + .put("xpack.monitoring.collection.enabled", true) |
| 23 | + .build(); |
| 24 | + |
21 | 25 | Settings transientSettings = Settings.builder()
|
22 | 26 | .put("indices.recovery.max_bytes_per_sec", "20mb")
|
| 27 | + .put("action.auto_create_index", true) |
| 28 | + .put("cluster.routing.allocation.enable", "primaries") |
23 | 29 | .build();
|
24 | 30 | Metadata metadataWithTransientSettings = Metadata.builder()
|
| 31 | + .persistentSettings(persistentSettings) |
25 | 32 | .transientSettings(transientSettings)
|
26 | 33 | .build();
|
27 | 34 |
|
28 | 35 | ClusterState badState = ClusterState.builder(new ClusterName("test")).metadata(metadataWithTransientSettings).build();
|
29 | 36 | DeprecationIssue issue = ClusterDeprecationChecks.checkTransientSettingsExistence(badState);
|
30 | 37 | assertThat(issue, equalTo(
|
31 | 38 | new DeprecationIssue(DeprecationIssue.Level.WARNING,
|
32 |
| - "Transient cluster settings are in the process of being removed.", |
| 39 | + "Transient cluster settings are deprecated", |
33 | 40 | "https://ela.st/es-deprecation-7-transient-cluster-settings",
|
34 |
| - "Use persistent settings to define your cluster settings instead.", |
| 41 | + "Use persistent settings to configure your cluster.", |
35 | 42 | false, null)
|
36 | 43 | ));
|
37 | 44 |
|
38 |
| - Settings persistentSettings = Settings.builder() |
| 45 | + persistentSettings = Settings.builder() |
39 | 46 | .put("indices.recovery.max_bytes_per_sec", "20mb")
|
40 | 47 | .build();
|
41 | 48 | Metadata metadataWithoutTransientSettings = Metadata.builder()
|
|
0 commit comments