kibana/x-pack/test/reporting_api_integration/reporting_and_security.config.ts

43 lines
1.4 KiB
TypeScript
Raw Normal View History

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { FtrConfigProviderContext } from '@kbn/test';
import { resolve } from 'path';
import { ReportingAPIProvider } from './services';
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const apiConfig = await readConfigFile(require.resolve('../api_integration/config'));
// config for testing network policy
const testPolicyRules = [
{ allow: true, protocol: 'http:' },
{ allow: false, host: 'via.placeholder.com' },
{ allow: true, protocol: 'https:' },
{ allow: true, protocol: 'data:' },
{ allow: false },
];
return {
...apiConfig.getAll(),
junit: { reportName: 'X-Pack Reporting API Integration Tests' },
testFiles: [resolve(__dirname, './reporting_and_security')],
services: {
...apiConfig.get('services'),
reportingAPI: ReportingAPIProvider,
},
kbnTestServer: {
...apiConfig.get('kbnTestServer'),
serverArgs: [
...apiConfig.get('kbnTestServer.serverArgs'),
`--xpack.reporting.capture.networkPolicy.rules=${JSON.stringify(testPolicyRules)}`,
`--xpack.reporting.capture.maxAttempts=1`,
[Reporting-CSV Export] Re-write CSV Export using SearchSource (#88303) * [Reporting-CSV Export] Re-write CSV Export using SearchSource * replace PIT solution with scan-and-scroll * update tests * cleanup * simplify pr * update docs * update docs * update telemetry schema * use getSearchRequestBody instead of flatten * Revert "update docs" This reverts commit ab9f4d9642136fb0f53213dbe06037efaa89b6b9. * optimize some async calls * cleanup * --wip-- [skip ci] * fix telemetry schema * fix telemetry tests * fix snapshot * api docs * api doc updates * use import type * format the data through chains of maps * add another saved search to reporting/ecommerce_kibana * add a failing test * add error logging to query failures * put clear scroll in a finally so the ES error can be captured * log dat error * set dat fieldsFromSource * --wip-- [skip ci] * Revert "add another saved search to reporting/ecommerce_kibana" This reverts commit 6edf26eff255189c4a2c88a93a327497bd833410. * functional test fixes * clean up ecommerce test archive * add test for new search with fieldsFromSource set * add tests and refactor tests * cleanup redundant conditionals * add GenerateCsv.getFields * fix some tests * fix double-escaping * fix test snapshots and refactoring * fix other tests * fix test * fix default index pattern in functional tests * fix ts and sort fields when they come from API response * --wip-- [skip ci] * fix formatting and increase maxSizeBytes for testing * remove client-side logic for sanitizing fields * do not prepend timefield name if it already is a column * test the logic to prepend timeField * test the logic to sort the fields * fix functional test * preserve the error from data.search * add functional test for ES returning an error * fix snapshot Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-16 19:54:47 +01:00
`--xpack.reporting.csv.maxSizeBytes=6000`,
],
},
};
}