Skip to content

Commit

Permalink
[ES|QL] Integration tests (elastic#177017)
Browse files Browse the repository at this point in the history
## Summary

The validation test suite now dumps all test cases into a JSON with a
flag that tell if the query should fail or not.

On top of that an integration test has been written, who collects the
JSON and execute it again against the ES ES|QL `_query` endpoint, then
compare the two result.

* if both results are the same (both pass or errors) then it's good to
go ✅
* if client side fails and ES pass, then it's a failure ❌ 
* if client side passes and ES fails, then it's bad but still ok ⚠️ 
* in this case the error is logged and stored into a JSON (not
committed)

All tests are ran 8 times ( stringField => `["text", "keyword"]`,
numberField => `["integer", "double", "long", "unsigned_long]` for a
totale of ~16k assertions (2000 x 8 tests).
Assertions have to be within a single test to avoid memory issues on the
CI otherwise.

~~Fixes the signature utility for functions with a minimum number of
args.~~



### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Stratoula Kalafateli <[email protected]>
  • Loading branch information
3 people authored Feb 19, 2024
1 parent f4fb1e8 commit 392bb40
Show file tree
Hide file tree
Showing 6 changed files with 8,671 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/kbn-monaco/src/esql/lib/ast/validation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
esql_validation_missmatches.json
Loading

0 comments on commit 392bb40

Please sign in to comment.