From 91b7770b3ac04cc91bdf6a387518719b9ab5fce1 Mon Sep 17 00:00:00 2001 From: Alison Goryachev Date: Thu, 1 Apr 2021 15:36:05 -0400 Subject: [PATCH] [Rollups] Update API integration test (#96071) --- .../apis/management/rollup/rollup.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/x-pack/test/api_integration/apis/management/rollup/rollup.js b/x-pack/test/api_integration/apis/management/rollup/rollup.js index a556c8071ca8..699592fd9992 100644 --- a/x-pack/test/api_integration/apis/management/rollup/rollup.js +++ b/x-pack/test/api_integration/apis/management/rollup/rollup.js @@ -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', () => { @@ -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) => { + expect(body.numericFields.includes(numericField)).to.be(true); + }); }); it("should not return any fields when the index pattern doesn't match any indices", async () => {