update mock script engines to take name parameter
Original commit: elastic/x-pack-elasticsearch@c6c48eca39
This commit is contained in:
parent
0beefb5299
commit
91426062c1
|
@ -46,12 +46,11 @@ public class MockMustacheScriptEngine extends MockScriptEngine {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Object compile(String script, Map<String, String> params) {
|
||||
public Object compile(String name, String script, Map<String, String> params) {
|
||||
if (script.contains("{{") && script.contains("}}")) {
|
||||
throw new IllegalArgumentException("Fix your test to not rely on mustache");
|
||||
}
|
||||
|
||||
return script;
|
||||
return super.compile(name, script, params);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -55,8 +55,8 @@ public class SleepScriptEngine implements ScriptEngineService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Object compile(String script, Map<String, String> params) {
|
||||
return script;
|
||||
public Object compile(String scriptName, String scriptSource, Map<String, String> params) {
|
||||
return scriptSource;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue