Skip to content

Commit a379802

Browse files
committed
Added YAML test to check the error
1 parent f4fbc99 commit a379802

File tree

1 file changed

+21
-0
lines changed
  • modules/aggregations/src/yamlRestTest/resources/rest-api-spec/test/aggregations

1 file changed

+21
-0
lines changed

modules/aggregations/src/yamlRestTest/resources/rest-api-spec/test/aggregations/bucket_script.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,3 +340,24 @@ top level fails:
340340
buckets_path:
341341
b: b
342342
script: params.b + 12
343+
344+
---
345+
invalid parent aggregation:
346+
- do:
347+
catch: /Expected a multi bucket aggregation but got \[InternalFilter\] for aggregation \[d\]/
348+
search:
349+
body:
350+
aggs:
351+
a:
352+
filter:
353+
term:
354+
a: 1
355+
aggs:
356+
b:
357+
sum:
358+
field: b
359+
d:
360+
bucket_script:
361+
buckets_path:
362+
b: b
363+
script: params.b + 12

0 commit comments

Comments
 (0)