Settings: Update settings deprecation from yml to yaml (#24663)

This converts the deprecation added for 5.5 from .yml to .yaml. Note
that this deprecation has not been released yet.

relates #19391
This commit is contained in:
Ryan Ernst 2017-05-14 17:40:50 -07:00 committed by GitHub
parent 4e21a33689
commit e6535bc771
2 changed files with 6 additions and 6 deletions

View File

@ -416,9 +416,9 @@ final class Bootstrap {
// pkg private for tests
static void checkConfigExtension(String extension) {
if (".yml".equals(extension) || ".json".equals(extension)) {
if (".yaml".equals(extension) || ".json".equals(extension)) {
final DeprecationLogger deprecationLogger = new DeprecationLogger(Loggers.getLogger(Bootstrap.class));
deprecationLogger.deprecated("elasticsearch{} is deprecated; rename your configuration file to elasticsearch.yaml", extension);
deprecationLogger.deprecated("elasticsearch{} is deprecated; rename your configuration file to elasticsearch.yml", extension);
}
}

View File

@ -25,9 +25,9 @@ public class BootstrapTests extends ESTestCase {
public void testConfigDeprecation() {
Bootstrap.checkConfigExtension(".json");
assertWarnings("elasticsearch.json is deprecated; rename your configuration file to elasticsearch.yaml");
Bootstrap.checkConfigExtension(".yml");
assertWarnings("elasticsearch.yml is deprecated; rename your configuration file to elasticsearch.yaml");
Bootstrap.checkConfigExtension(".yaml"); // no warnings, will be checked in @After
assertWarnings("elasticsearch.json is deprecated; rename your configuration file to elasticsearch.yml");
Bootstrap.checkConfigExtension(".yaml");
assertWarnings("elasticsearch.yaml is deprecated; rename your configuration file to elasticsearch.yml");
Bootstrap.checkConfigExtension(".yml"); // no warnings, will be checked in @After
}
}