Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Dec 12, 2019
1 parent 32fbe00 commit 5b2dce3
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
4 changes: 3 additions & 1 deletion x-pack/test/reporting/api/bwc_existing_indexes.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ 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';
cleanupIndexAlias = await reportingAPI.coerceReportsIntoExistingIndex(ARCHIVED_REPORTING_INDEX);

const stats = await usageAPI.getUsageStats();
expectedCompletedReportCount = await reportingAPI.getCompletedReportCount(stats);

await esArchiver.unload('reporting/bwc/6_2');
});

after('remove index alias', async () => {
Expand Down
8 changes: 6 additions & 2 deletions x-pack/test/reporting/api/usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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');
});
});

Expand Down
5 changes: 1 addition & 4 deletions x-pack/test/reporting/configs/chromium_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand All @@ -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'),
};
}
8 changes: 2 additions & 6 deletions x-pack/test/reporting/configs/chromium_functional.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@
* 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'));

return {
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',
Expand All @@ -34,5 +28,7 @@ export default async function ({ readConfigFile }) {
'--xpack.spaces.enabled=false',
],
},
esArchiver: functionalConfig.get('esArchiver'),
esTestCluster: functionalConfig.get('esTestCluster'),
};
}

0 comments on commit 5b2dce3

Please sign in to comment.