Martijn van Groningen 2016-09-06 07:17:38 +02:00
parent 7965608add
commit 36486a7993
2 changed files with 4 additions and 5 deletions

View File

@ -37,7 +37,7 @@ public class TextTemplate implements ToXContent {
public TextTemplate(String template, @Nullable XContentType contentType, ScriptType type,
@Nullable Map<String, Object> params) {
this.script = new Script(template, type, null, params, contentType);
this.script = new Script(template, type, "mustache", params, contentType);
this.inlineTemplate = null;
}
@ -95,7 +95,7 @@ public class TextTemplate implements ToXContent {
if (parser.currentToken() == XContentParser.Token.VALUE_STRING) {
return new TextTemplate(parser.text());
} else {
return new TextTemplate(Script.parse(parser, ParseFieldMatcher.STRICT, null));
return new TextTemplate(Script.parse(parser, ParseFieldMatcher.STRICT, "mustache"));
}
}
}

View File

@ -25,6 +25,7 @@ import org.elasticsearch.common.xcontent.support.XContentMapValues;
import org.elasticsearch.env.Environment;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.license.XPackLicenseState;
import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptSettings;
import org.elasticsearch.xpack.XPackSettings;
import org.elasticsearch.plugins.Plugin;
@ -102,12 +103,10 @@ import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsNot.not;
/**
*/
@ClusterScope(scope = SUITE, numClientNodes = 0, transportClientRatio = 0, randomDynamicTemplates = false, maxNumDataNodes = 3)
public abstract class AbstractWatcherIntegrationTestCase extends ESIntegTestCase {
public static final String WATCHER_LANG = ScriptSettings.DEFAULT_LANG;
public static final String WATCHER_LANG = Script.DEFAULT_SCRIPT_LANG;
private static final boolean timeWarpEnabled = SystemPropertyUtil.getBoolean("tests.timewarp", true);