Changes for PR: https://github.com/elastic/elasticsearch/pull/20310
Original commit: elastic/x-pack-elasticsearch@9db3d05274
This commit is contained in:
parent
7965608add
commit
36486a7993
|
@ -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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue