Skip to content

Commit

Permalink
[Reporting/API Testing] Simplify config (elastic#43216) (elastic#43235)
Browse files Browse the repository at this point in the history
- Remove injection of `x-pack/test/functional/config.js`
- No more starting the optimizer when running thees tests
  • Loading branch information
tsullivan authored Aug 15, 2019
1 parent 3434d05 commit 6d9f098
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions x-pack/test/reporting/configs/generate_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { esTestConfig, kbnTestConfig } from '@kbn/test';
import { format as formatUrl } from 'url';
import { getApiIntegrationConfig } from '../../api_integration/config';
import { getReportingApiConfig } from './api';

export default async function ({ readConfigFile }) {
const servers = {
kibana: kbnTestConfig.getUrlParts(),
elasticsearch: esTestConfig.getUrlParts(),
};

const apiTestConfig = await getApiIntegrationConfig({ readConfigFile });
const reportingApiConfig = await getReportingApiConfig({ readConfigFile });
const xPackFunctionalTestsConfig = await readConfigFile(require.resolve('../../functional/config.js'));
Expand All @@ -23,8 +30,16 @@ export default async function ({ readConfigFile }) {
kbnTestServer: {
...xPackFunctionalTestsConfig.get('kbnTestServer'),
serverArgs: [
...xPackFunctionalTestsConfig.get('kbnTestServer.serverArgs'),
'--xpack.reporting.csv.enablePanelActionDownload=true',
`--optimize.enabled=false`,
`--logging.json=false`,
`--server.maxPayloadBytes=1679958`,
`--server.port=${kbnTestConfig.getPort()}`,
`--elasticsearch.hosts=${formatUrl(servers.elasticsearch)}`,
`--elasticsearch.password=${servers.elasticsearch.password}`,
`--elasticsearch.username=${servers.elasticsearch.username}`,
`--xpack.reporting.csv.enablePanelActionDownload=true`,
`--xpack.reporting.csv.maxSizeBytes=2850`,
`--xpack.reporting.queue.pollInterval=3000`,
],
},
esArchiver: apiTestConfig.esArchiver,
Expand Down

0 comments on commit 6d9f098

Please sign in to comment.