kibana/x-pack/test/reporting/api/bwc_existing_indexes.js
Lee Drengenberg d9cd4e614e
[Reporting] skip flaky reporting tests (#45659)
* Add option for Internet Explorer IE11

* WIP trying to figure out IE options/capabilities

* more attempts to get IE tests working

* more work, but still can't set font size in Dev Tools Console

* two changes for IE

* revert skip in console test

* this change *appears* to set absolute times but they don't stick

* Shakespeare passing on all 3 browsers

* add config.ie.js, change 'internet explorer' to 'ie'

* increase notifications:lifetime so ew have a chance to see the message

* correct path with this missing slash

* skip flaky tests issues #45499 #42725

* revert these files to master

* revert to master
2019-09-13 15:34:35 -05:00

66 lines
3 KiB
JavaScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import * as GenerationUrls from './generation_urls';
/**
* This file tests the situation when a reporting index spans releases. By default reporting indexes are created
* on a weekly basis, but this is configurable so it is possible a user has this set to yearly. In that event, it
* is possible report data is getting posted to an index that was created by a very old version. We don't have a
* reporting index migration plan, so this test is important to ensure BWC, or that in the event we decide to make
* a major change in a major release, we handle it properly.
*/
export default function ({ getService }) {
const esArchiver = getService('esArchiver');
const reportingAPI = getService('reportingAPI');
const usageAPI = getService('usageAPI');
// FLAKY: https://github.com/elastic/kibana/issues/42725
describe.skip('BWC report generation into existing indexes', () => {
let expectedCompletedReportCount;
let cleanupIndexAlias;
describe('existing 6_2 index', () => {
before('load data and add index alias', async () => {
await reportingAPI.deleteAllReportingIndexes();
await esArchiver.load('bwc/6_2');
// The index name in the 6_2 archive.
const ARCHIVED_REPORTING_INDEX = '.reporting-2018.03.11';
cleanupIndexAlias = await reportingAPI.coerceReportsIntoExistingIndex(ARCHIVED_REPORTING_INDEX);
const stats = await usageAPI.getUsageStats();
expectedCompletedReportCount = await reportingAPI.getCompletedReportCount(stats);
});
after('remove index alias', async () => {
await cleanupIndexAlias();
});
// Might not be great test practice to lump all these jobs together but reporting takes awhile and it'll be
// more efficient to post them all up front, then sequentially.
it('multiple jobs posted', async () => {
const reportPaths = [];
reportPaths.push(await reportingAPI.postJob(GenerationUrls.CSV_DISCOVER_KUERY_AND_FILTER_6_3));
reportPaths.push(await reportingAPI.postJob(GenerationUrls.PDF_PRESERVE_DASHBOARD_FILTER_6_3));
reportPaths.push(await reportingAPI.postJob(GenerationUrls.PDF_PRESERVE_PIE_VISUALIZATION_6_3));
reportPaths.push(await reportingAPI.postJob(GenerationUrls.PDF_PRINT_DASHBOARD_6_3));
reportPaths.push(await reportingAPI.postJob(
GenerationUrls.PDF_PRINT_PIE_VISUALIZATION_FILTER_AND_SAVED_SEARCH_6_3));
await reportingAPI.expectAllJobsToFinishSuccessfully(reportPaths);
}).timeout(1540000);
it('jobs completed successfully', async () => {
const stats = await usageAPI.getUsageStats();
expectedCompletedReportCount += 5;
reportingAPI.expectCompletedReportCount(stats, expectedCompletedReportCount);
});
});
});
}