diff --git a/core/src/main/java/org/elasticsearch/script/ScriptService.java b/core/src/main/java/org/elasticsearch/script/ScriptService.java index 656149be347..e5892ef1dcd 100644 --- a/core/src/main/java/org/elasticsearch/script/ScriptService.java +++ b/core/src/main/java/org/elasticsearch/script/ScriptService.java @@ -74,9 +74,9 @@ public class ScriptService extends AbstractComponent implements Closeable, Clust public static final String ALLOW_NONE = "none"; public static final Setting> TYPES_ALLOWED_SETTING = - Setting.listSetting("script.types_allowed", Collections.emptyList(), Function.identity(), Setting.Property.NodeScope); + Setting.listSetting("script.allowed_types", Collections.emptyList(), Function.identity(), Setting.Property.NodeScope); public static final Setting> CONTEXTS_ALLOWED_SETTING = - Setting.listSetting("script.contexts_allowed", Collections.emptyList(), Function.identity(), Setting.Property.NodeScope); + Setting.listSetting("script.allowed_contexts", Collections.emptyList(), Function.identity(), Setting.Property.NodeScope); private final Set typesAllowed; private final Set contextsAllowed; diff --git a/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java b/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java index ca47334df36..798ab79abb2 100644 --- a/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java +++ b/core/src/test/java/org/elasticsearch/script/ScriptServiceTests.java @@ -146,7 +146,7 @@ public class ScriptServiceTests extends ESTestCase { public void testAllowSomeScriptTypeSettings() throws IOException { Settings.Builder builder = Settings.builder(); - builder.put("script.types_allowed", "inline"); + builder.put("script.allowed_types", "inline"); buildScriptService(builder.build()); assertCompileAccepted("painless", "script", ScriptType.INLINE, ScriptContext.SEARCH); @@ -155,7 +155,7 @@ public class ScriptServiceTests extends ESTestCase { public void testAllowSomeScriptContextSettings() throws IOException { Settings.Builder builder = Settings.builder(); - builder.put("script.contexts_allowed", "search, aggs"); + builder.put("script.allowed_contexts", "search, aggs"); buildScriptService(builder.build()); assertCompileAccepted("painless", "script", ScriptType.INLINE, ScriptContext.SEARCH); @@ -165,7 +165,7 @@ public class ScriptServiceTests extends ESTestCase { public void testAllowNoScriptTypeSettings() throws IOException { Settings.Builder builder = Settings.builder(); - builder.put("script.types_allowed", "none"); + builder.put("script.allowed_types", "none"); buildScriptService(builder.build()); assertCompileRejected("painless", "script", ScriptType.INLINE, ScriptContext.SEARCH); @@ -174,7 +174,7 @@ public class ScriptServiceTests extends ESTestCase { public void testAllowNoScriptContextSettings() throws IOException { Settings.Builder builder = Settings.builder(); - builder.put("script.contexts_allowed", "none"); + builder.put("script.allowed_contexts", "none"); buildScriptService(builder.build()); assertCompileRejected("painless", "script", ScriptType.INLINE, ScriptContext.SEARCH); diff --git a/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/StoredExpressionTests.java b/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/StoredExpressionTests.java index 80fbabbb5ec..291f144f8ff 100644 --- a/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/StoredExpressionTests.java +++ b/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/StoredExpressionTests.java @@ -40,7 +40,7 @@ public class StoredExpressionTests extends ESIntegTestCase { @Override protected Settings nodeSettings(int nodeOrdinal) { Settings.Builder builder = Settings.builder().put(super.nodeSettings(nodeOrdinal)); - builder.put("script.contexts_allowed", "update"); + builder.put("script.allowed_contexts", "update"); return builder.build(); }