Skip to content

Conversation

@polyfractal
Copy link
Contributor

Part of #42893, this migrates the min aggregator integration tests over to unit tests in AggregatorTestCase.

While I was messing around with the unit tests, I refactored some of the existing unit tests to use the standardized searchAndReduce rather than bespoke version that was in place before.

- Also renames MinTests to MinAggregationBuilderTests
@polyfractal polyfractal added >test Issues or PRs that are addressing/adding tests :Analytics/Aggregations Aggregations v8.0.0 v7.6.0 labels Dec 10, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (:Analytics/Aggregations)

Copy link
Member

@not-napoleon not-napoleon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. There's some other cases we could test, like an incorrect type field or weird missing values, but I don't know that we need to do that right now. Long term, it'd be good to come up with a "standard battery" of tests we should apply to all aggs, but this is a great step towards standardized tests!

@polyfractal
Copy link
Contributor Author

Added a few more tests for missing, unmapped fields, bad types, bad missing, etc. Happy to add more if you have particular scenarios not covered. :)

Copy link
Member

@not-napoleon not-napoleon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests look great. I can't think of any other cases we urgently need to cover, so let's merge it.

@polyfractal polyfractal merged commit 9dec996 into elastic:master Dec 16, 2019
polyfractal added a commit that referenced this pull request Dec 16, 2019
Also renames MinTests to MinAggregationBuilderTests
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this pull request Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/Aggregations Aggregations >test Issues or PRs that are addressing/adding tests v7.6.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants