From 5b2dce3ff4ba9e38c4ccfc4f40d3ee67f531b8d1 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Thu, 12 Dec 2019 11:12:16 -0700 Subject: [PATCH] Update --- .../es_archives/reporting}/bwc/6_2/data.json.gz | Bin .../es_archives/reporting}/bwc/6_2/mappings.json | 0 .../es_archives/reporting}/bwc/6_3/data.json.gz | Bin .../es_archives/reporting}/bwc/6_3/mappings.json | 0 x-pack/test/reporting/api/bwc_existing_indexes.js | 4 +++- x-pack/test/reporting/api/usage.js | 8 ++++++-- x-pack/test/reporting/configs/chromium_api.js | 5 +---- .../test/reporting/configs/chromium_functional.js | 8 ++------ 8 files changed, 12 insertions(+), 13 deletions(-) rename x-pack/test/{reporting/es_archives => functional/es_archives/reporting}/bwc/6_2/data.json.gz (100%) rename x-pack/test/{reporting/es_archives => functional/es_archives/reporting}/bwc/6_2/mappings.json (100%) rename x-pack/test/{reporting/es_archives => functional/es_archives/reporting}/bwc/6_3/data.json.gz (100%) rename x-pack/test/{reporting/es_archives => functional/es_archives/reporting}/bwc/6_3/mappings.json (100%) diff --git a/x-pack/test/reporting/es_archives/bwc/6_2/data.json.gz b/x-pack/test/functional/es_archives/reporting/bwc/6_2/data.json.gz similarity index 100% rename from x-pack/test/reporting/es_archives/bwc/6_2/data.json.gz rename to x-pack/test/functional/es_archives/reporting/bwc/6_2/data.json.gz diff --git a/x-pack/test/reporting/es_archives/bwc/6_2/mappings.json b/x-pack/test/functional/es_archives/reporting/bwc/6_2/mappings.json similarity index 100% rename from x-pack/test/reporting/es_archives/bwc/6_2/mappings.json rename to x-pack/test/functional/es_archives/reporting/bwc/6_2/mappings.json diff --git a/x-pack/test/reporting/es_archives/bwc/6_3/data.json.gz b/x-pack/test/functional/es_archives/reporting/bwc/6_3/data.json.gz similarity index 100% rename from x-pack/test/reporting/es_archives/bwc/6_3/data.json.gz rename to x-pack/test/functional/es_archives/reporting/bwc/6_3/data.json.gz diff --git a/x-pack/test/reporting/es_archives/bwc/6_3/mappings.json b/x-pack/test/functional/es_archives/reporting/bwc/6_3/mappings.json similarity index 100% rename from x-pack/test/reporting/es_archives/bwc/6_3/mappings.json rename to x-pack/test/functional/es_archives/reporting/bwc/6_3/mappings.json diff --git a/x-pack/test/reporting/api/bwc_existing_indexes.js b/x-pack/test/reporting/api/bwc_existing_indexes.js index c5f4577897708..ff4bcc13042f7 100644 --- a/x-pack/test/reporting/api/bwc_existing_indexes.js +++ b/x-pack/test/reporting/api/bwc_existing_indexes.js @@ -28,7 +28,7 @@ export default function ({ getService }) { describe('existing 6_2 index', () => { before('load data and add index alias', async () => { await reportingAPI.deleteAllReportingIndexes(); - await esArchiver.load('bwc/6_2'); + await esArchiver.load('reporting/bwc/6_2'); // The index name in the 6_2 archive. const ARCHIVED_REPORTING_INDEX = '.reporting-2018.03.11'; @@ -36,6 +36,8 @@ export default function ({ getService }) { const stats = await usageAPI.getUsageStats(); expectedCompletedReportCount = await reportingAPI.getCompletedReportCount(stats); + + await esArchiver.unload('reporting/bwc/6_2'); }); after('remove index alias', async () => { diff --git a/x-pack/test/reporting/api/usage.js b/x-pack/test/reporting/api/usage.js index 1b70ab9e4547f..286112c53b656 100644 --- a/x-pack/test/reporting/api/usage.js +++ b/x-pack/test/reporting/api/usage.js @@ -46,7 +46,7 @@ export default function ({ getService }) { describe('from archive data', () => { it('generated from 6.2', async () => { - await esArchiver.load('bwc/6_2'); + await esArchiver.load('reporting/bwc/6_2'); const usage = await usageAPI.getUsageStats(); reportingAPI.expectRecentJobTypeTotalStats(usage, 'csv', 0); @@ -64,11 +64,13 @@ export default function ({ getService }) { reportingAPI.expectAllTimePdfAppStats(usage, 'dashboard', 0); reportingAPI.expectAllTimePdfLayoutStats(usage, 'preserve_layout', 0); reportingAPI.expectAllTimePdfLayoutStats(usage, 'print', 0); + + await esArchiver.unload('reporting/bwc/6_2'); }); it('generated from 6.3', async () => { - await esArchiver.load('bwc/6_3'); + await esArchiver.load('reporting/bwc/6_3'); const usage = await usageAPI.getUsageStats(); reportingAPI.expectRecentJobTypeTotalStats(usage, 'csv', 0); @@ -84,6 +86,8 @@ export default function ({ getService }) { reportingAPI.expectAllTimePdfAppStats(usage, 'dashboard', 3); reportingAPI.expectAllTimePdfLayoutStats(usage, 'preserve_layout', 3); reportingAPI.expectAllTimePdfLayoutStats(usage, 'print', 3); + + await esArchiver.unload('reporting/bwc/6_3'); }); }); diff --git a/x-pack/test/reporting/configs/chromium_api.js b/x-pack/test/reporting/configs/chromium_api.js index 740ad4b8aaee5..8c03c407ed168 100644 --- a/x-pack/test/reporting/configs/chromium_api.js +++ b/x-pack/test/reporting/configs/chromium_api.js @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import * as path from 'path'; import { ReportingAPIProvider } from '../services'; export default async function ({ readConfigFile }) { @@ -30,9 +29,7 @@ export default async function ({ readConfigFile }) { '--xpack.spaces.enabled=false', ], }, - esArchiver: { - directory: path.resolve(__dirname, '../es_archives') - }, + esArchiver: apiConfig.get('esArchiver'), esTestCluster: apiConfig.get('esTestCluster'), }; } diff --git a/x-pack/test/reporting/configs/chromium_functional.js b/x-pack/test/reporting/configs/chromium_functional.js index 9d544125e7a5d..ae63aee27fc4e 100644 --- a/x-pack/test/reporting/configs/chromium_functional.js +++ b/x-pack/test/reporting/configs/chromium_functional.js @@ -4,8 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import * as path from 'path'; - export default async function ({ readConfigFile }) { const functionalConfig = await readConfigFile(require.resolve('../../functional/config.js')); @@ -13,11 +11,7 @@ export default async function ({ readConfigFile }) { services: functionalConfig.get('services'), pageObjects: functionalConfig.get('pageObjects'), servers: functionalConfig.get('servers'), - esTestCluster: functionalConfig.get('esTestCluster'), apps: functionalConfig.get('apps'), - esArchiver: { - directory: path.resolve(__dirname, '../es_archives') - }, screenshots: functionalConfig.get('screenshots'), junit: { reportName: 'X-Pack Chromium Functional Reporting Tests', @@ -34,5 +28,7 @@ export default async function ({ readConfigFile }) { '--xpack.spaces.enabled=false', ], }, + esArchiver: functionalConfig.get('esArchiver'), + esTestCluster: functionalConfig.get('esTestCluster'), }; }