Replace script unit tests with integration tests#60027
Replace script unit tests with integration tests#60027nik9000 merged 1 commit intoelastic:feature/runtime_fieldsfrom
Conversation
This replaces the fancy unit tests that we were doing to test our painless integration with an extension to our existing integration tests. The integration tests are "more real", shorter, and are a nice step down the road of dropping our dependency on the painless plugin in favor of a dependency only on it's SPI.
|
Pinging @elastic/es-search (:Search/Search) |
|
I see where this comes from, but this raises a question for me: "are we overusing yaml tests?" They are nice to read and nice to have but ideally we should have more java tests and possibly unit tests. I understand why testing scripting is hard from a unit test and yaml tests are real and give you confidence that stuff works, though I don't like that we rely on yaml tests so much. |
|
Personally I'm ok with more yml tests, but I can see where you are coming from. If I were to cut back on the yml tests I'd remove most of the query tests and rely on the tests we have in the mapped field type. I think integration tests are pretty compelling for testing these cases so we can check the out how we integrate with painless without the unit tests depending on painless. Right now I think we are the only project who's unit tests depend on painless. I figure we should follow along. The only reason I added the unit test dependency on painless in the first place is because we couldn't make a mapper. |
|
I think it may make sense to have less yaml tests for queries, as they duplicate unit tests for them. |
|
Thanks @javanna ! I'll open a PR to drop a few yml tests for queries. |
This replaces the fancy unit tests that we were doing to test our
painless integration with an extension to our existing integration
tests. The integration tests are "more real", shorter, and are a nice
step down the road of dropping our dependency on the painless plugin in
favor of a dependency only on it's SPI.