Skip to content

Commit cb676a7

Browse files
Fix UT error
1 parent b2e796c commit cb676a7

File tree

1 file changed

+8
-2
lines changed
  • x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql

1 file changed

+8
-2
lines changed

x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/230_folding.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,10 @@ Foldable query using MULTI_MATCH on name but with non-foldable expression:
346346
| KEEP hire_date, salary, salary_change, salary_change_long, name
347347
| LIMIT 5
348348
- match: { error.type: "verification_exception" }
349-
- contains: { error.reason: "Query must be a valid string in [MULTI_MATCH(CONCAT(\"Bob \", name), name)], found [CONCAT(\"Bob \", name)]" }
349+
# We only check that the problematic string is there, because the error message is slightly different in old versions
350+
# first argument of [MULTI_MATCH(CONCAT("Bob ", name), name)] must be a constant, received [CONCAT("Bob ", name)]
351+
# Query must be a valid string in [MULTI_MATCH(CONCAT(\"Bob \", name), name)], found [CONCAT(\"Bob \", name)]
352+
- contains: { error.reason: "[MULTI_MATCH(CONCAT(\"Bob \", name), name)]" }
350353

351354
---
352355

@@ -369,7 +372,10 @@ Query using MULTI_MATCH on name but with non constant query:
369372
| KEEP hire_date, salary, salary_change, salary_change_long, name
370373
| LIMIT 5
371374
- match: { error.type: "verification_exception" }
372-
- contains: { error.reason: "Query must be a valid string in [MULTI_MATCH(name, name)], found [name" }
375+
# We only check that the problematic string is there, because the error message is slightly different in old versions
376+
#first argument of [MULTI_MATCH(CONCAT("Bob ", name), name)] must be a constant, received [CONCAT("Bob ", name)]
377+
#Query must be a valid string in [MULTI_MATCH(name, name)], found [name
378+
- contains: { error.reason: "[MULTI_MATCH(name, name)]" }
373379

374380
---
375381

0 commit comments

Comments
 (0)