Skip to content

Yaml tests for range family aggregations #75434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Sep 15, 2021

Conversation

not-napoleon
Copy link
Member

Relates to #26220

We already had some tests for Date, Numeric, and IP ranges. This PR breaks them out into three yaml files, and adds coverage for options and modes we weren't exercising before.

@not-napoleon not-napoleon added >test Issues or PRs that are addressing/adding tests :Analytics/Aggregations Aggregations v8.0.0 v7.15.0 labels Jul 16, 2021
@not-napoleon
Copy link
Member Author

@elasticmachine update branch

@not-napoleon not-napoleon marked this pull request as ready for review September 14, 2021 19:17
@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Sep 14, 2021
@elasticmachine
Copy link
Collaborator

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

}
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

These'd be shorter in yaml. You know you can send yaml in curl if you want too. It works.

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't know you could send yaml in curl, actually. I'll have to try that the next time I'm messing around with it. This is the result of me copy/pasting an existing test. If you feel strongly about it, I'll clean it up, otherwise I don't think it's a big deal if it sits like this for a while.


- do:
cluster.health:
wait_for_status: green
Copy link
Member

Choose a reason for hiding this comment

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

We actually wait for yellow by default which is enough. I think these are mostly left over from the before times.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, again, I just copied what the existing test did.

body: { "date" : 3000 }

- do:
indices.refresh: {}
Copy link
Member

Choose a reason for hiding this comment

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

It'd be a little more readable to do this with bulk and a single refresh. Maybe even a little faster.


- do:
search:
rest_total_hits_as_int: true
Copy link
Member

Choose a reason for hiding this comment

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

At some point we're going to deprecate this thing so I'd try to avoid adding it to master. It is sort of required if you are running these against 6.x, but maybe only add on backport? I dunno.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ugh, I hadn't even thought of that. We use that all over the place in these tests

@not-napoleon
Copy link
Member Author

@elasticmachine update branch

@not-napoleon not-napoleon merged commit d3fa4d1 into elastic:master Sep 15, 2021
@not-napoleon not-napoleon deleted the date-range-rest-tests branch September 15, 2021 20:33
not-napoleon added a commit to not-napoleon/elasticsearch that referenced this pull request Sep 15, 2021
# Conflicts:
#	rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.aggregation/40_range.yml
not-napoleon added a commit that referenced this pull request Sep 15, 2021
* Yaml tests for range family aggregations (#75434)

# Conflicts:
#	rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search.aggregation/40_range.yml

* add back track total hits as int for 6.x bwc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test Issues or PRs that are addressing/adding tests v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants