Skip to content

Commit 7bce2a1

Browse files
cjcenizalTyler Smalley
and
Tyler Smalley
authored
[test] Updates rollup test to allow incoming doc_count field mapper (#82547) (#82554)
* [test] Updates rollup test to allow incoming doc_count field mapper A doc_count field mapper was added in elastic/elasticsearch#64503 This is currently failing the ES promotion. After this promotion, we can go back and update this test to be an exact match on the body if we think that is the desired assertion. Signed-off-by: Tyler Smalley <[email protected]> Co-authored-by: Tyler Smalley <[email protected]>
1 parent 0997040 commit 7bce2a1

File tree

1 file changed

+15
-7
lines changed
  • x-pack/test/api_integration/apis/management/rollup

1 file changed

+15
-7
lines changed

x-pack/test/api_integration/apis/management/rollup/rollup.js

+15-7
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,21 @@ export default function ({ getService }) {
4545

4646
const { body } = await supertest.get(uri).expect(200);
4747

48-
expect(body).to.eql({
49-
dateFields: ['testCreatedField'],
50-
keywordFields: ['testTagField'],
51-
numericFields: ['testTotalField'],
52-
doesMatchIndices: true,
53-
doesMatchRollupIndices: false,
54-
});
48+
expect(Object.keys(body)).to.eql([
49+
'doesMatchIndices',
50+
'doesMatchRollupIndices',
51+
'dateFields',
52+
'numericFields',
53+
'keywordFields',
54+
]);
55+
56+
expect(body.doesMatchIndices).to.be(true);
57+
expect(body.doesMatchRollupIndices).to.be(false);
58+
expect(body.dateFields).to.eql(['testCreatedField']);
59+
expect(body.keywordFields).to.eql(['testTagField']);
60+
61+
// Allowing the test to account for future addition of doc_count
62+
expect(body.numericFields.indexOf('testTotalField')).to.be.greaterThan(-1);
5563
});
5664

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

0 commit comments

Comments
 (0)