From 7c5964d3b07bd0d70043a3800e13cdd3c0a9b1d1 Mon Sep 17 00:00:00 2001 From: Quynh Nguyen Date: Sun, 27 Aug 2023 15:00:30 -0500 Subject: [PATCH] Add dest index mapping --- .../index_pattern/continuous_transform.ts | 101 +++++++++++++++++- 1 file changed, 99 insertions(+), 2 deletions(-) diff --git a/x-pack/test/functional/apps/transform/creation/index_pattern/continuous_transform.ts b/x-pack/test/functional/apps/transform/creation/index_pattern/continuous_transform.ts index 648f7f8ccc044..813a8e3e6c8d4 100644 --- a/x-pack/test/functional/apps/transform/creation/index_pattern/continuous_transform.ts +++ b/x-pack/test/functional/apps/transform/creation/index_pattern/continuous_transform.ts @@ -224,8 +224,105 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ]; for (const testData of testDataList) { - // FLAKY: https://github.com/elastic/kibana/issues/158612 - describe.skip(`${testData.suiteTitle}`, function () { + describe(`${testData.suiteTitle}`, function () { + before(async () => { + // Add explicit mapping for destination index https://github.com/elastic/elasticsearch/issues/67148 + if (testData.type === 'latest') { + const destIndexMappings: MappingTypeMapping = { + properties: { + "customer_id": { + "type": "long" + }, + "day_of_week_i": { + "type": "long" + }, + "order_date": { + "type": "date" + }, + "order_id": { + "type": "long" + }, + "products": { + "properties": { + "_id": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "base_price": { + "type": "float" + }, + "base_unit_price": { + "type": "float" + }, + "created_on": { + "type": "date" + }, + "discount_amount": { + "type": "float" + }, + "discount_percentage": { + "type": "float" + }, + "min_price": { + "type": "float" + }, + "price": { + "type": "float" + }, + "product_id": { + "type": "long" + }, + "product_name": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "quantity": { + "type": "long" + }, + "tax_amount": { + "type": "float" + }, + "taxful_price": { + "type": "float" + }, + "taxless_price": { + "type": "float" + }, + "unit_discount_amount": { + "type": "float" + } + } + }, + "taxful_total_price": { + "type": "float" + }, + "taxless_total_price": { + "type": "float" + }, + "total_quantity": { + "type": "long" + }, + "total_unique_products": { + "type": "long" + }, + }, + }; + + await transform.api.createIndices(testData.destinationIndex, { + mappings: destIndexMappings, + }); + } + }); after(async () => { await transform.api.deleteIndices(testData.destinationIndex); await transform.testResources.deleteIndexPatternByTitle(testData.destinationIndex);