Skip to content
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

[Rollups] Update API integration test #96071

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions x-pack/test/api_integration/apis/management/rollup/rollup.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ export default function ({ getService }) {
cleanUp,
} = registerHelpers(getService);

// FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/96002
describe.skip('jobs', () => {
describe('jobs', () => {
after(() => cleanUp());

describe('indices', () => {
Expand Down Expand Up @@ -57,10 +56,16 @@ export default function ({ getService }) {
expect(body.doesMatchIndices).to.be(true);
expect(body.doesMatchRollupIndices).to.be(false);
expect(body.dateFields).to.eql(['testCreatedField']);
expect(body.keywordFields).to.eql(['testTagField']);

// Allowing the test to account for future addition of doc_count
expect(body.numericFields.indexOf('testTotalField')).to.be.greaterThan(-1);
// '_tier' is an expected metadata field from ES
// Order is not guaranteed, so we assert against individual field names
['_tier', 'testTagField'].forEach((keywordField) => {
expect(body.keywordFields.includes(keywordField)).to.be(true);
});
// '_doc_count' is an expected metadata field from ES
// Order is not guaranteed, so we assert against individual field names
['_doc_count', 'testTotalField'].forEach((numericField) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

follow-up to #82547

expect(body.numericFields.includes(numericField)).to.be(true);
});
});

it("should not return any fields when the index pattern doesn't match any indices", async () => {
Expand Down