From f861bb16613332d790ead51f5e0fed8a3d17d4bf Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Wed, 6 Jul 2016 12:53:27 +0200 Subject: [PATCH] MockScriptEngine and associated plugin has changed in ES core Original commit: elastic/x-pack-elasticsearch@bb31b7b7c9a99ab2e384c1c51f96f1ae7d6abb0b --- .../elasticsearch/script/MockMustacheScriptEngine.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java index 30f4105ba89..0fe5e1b6fa6 100644 --- a/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java +++ b/elasticsearch/x-pack/watcher/src/test/java/org/elasticsearch/script/MockMustacheScriptEngine.java @@ -8,7 +8,9 @@ package org.elasticsearch.script; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.xpack.common.text.DefaultTextTemplateEngine; +import java.util.Collections; import java.util.Map; +import java.util.function.Function; /** * A mock script engine that registers itself under the 'mustache' name so that @@ -19,11 +21,16 @@ public class MockMustacheScriptEngine extends MockScriptEngine { public static final String NAME = "mustache"; - public static class TestPlugin extends MockScriptEngine.TestPlugin { + public static class TestPlugin extends MockScriptPlugin { @Override public ScriptEngineService getScriptEngineService(Settings settings) { return new MockMustacheScriptEngine(); } + + @Override + protected Map, Object>> pluginScripts() { + return Collections.emptyMap(); + } } @Override