mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-24 17:09:48 +00:00
remove lang url parameter from stored script requests (elastic/x-pack-elasticsearch#2029)
Original commit: elastic/x-pack-elasticsearch@1044c3ba53
This commit is contained in:
parent
5ecbbbd46d
commit
e007fee9fb
@ -230,7 +230,6 @@ public class BasicWatcherTests extends AbstractWatcherIntegrationTestCase {
|
||||
public void testConditionSearchWithIndexedTemplate() throws Exception {
|
||||
SearchSourceBuilder searchSourceBuilder = searchSource().query(matchQuery("level", "a"));
|
||||
assertAcked(client().admin().cluster().preparePutStoredScript()
|
||||
.setLang("mustache")
|
||||
.setId("my-template")
|
||||
.setContent(jsonBuilder().startObject().field("template").value(searchSourceBuilder).endObject().bytes(), XContentType.JSON)
|
||||
.get());
|
||||
|
@ -120,8 +120,8 @@ public class TransformIntegrationTests extends AbstractWatcherIntegrationTestCas
|
||||
logger.info("testing script transform with an indexed script");
|
||||
assertAcked(client().admin().cluster().preparePutStoredScript()
|
||||
.setId("my-script")
|
||||
.setLang("mockscript")
|
||||
.setContent(new BytesArray("{\"script\" : \"['key3' : ctx.payload.key1 + ctx.payload.key2]\"}"), XContentType.JSON)
|
||||
.setContent(new BytesArray("{\"script\" : {\"lang\": \"" + MockScriptPlugin.NAME + "\", " +
|
||||
"\"source\": \"['key3' : ctx.payload.key1 + ctx.payload.key2]\"}"), XContentType.JSON)
|
||||
.get());
|
||||
script = new Script(ScriptType.STORED, null, "my-script", Collections.emptyMap());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user