[Reporting] Re-enabled Chromium API tests (#26789)
* [Reporting] Test logging * chromium api tests fixed * whitespace
This commit is contained in:
parent
339e38b96a
commit
ba82bc2f59
|
@ -124,6 +124,16 @@ export function jobs(server) {
|
|||
const { docId } = request.params;
|
||||
|
||||
let response = await jobResponseHandler(request.pre.management.jobTypes, request.pre.user, h, { docId });
|
||||
const { statusCode } = response;
|
||||
|
||||
if (statusCode !== 200) {
|
||||
const logLevel = statusCode === 500 ? 'error' : 'debug';
|
||||
server.log(
|
||||
[logLevel, "reporting", "download"],
|
||||
`Report ${docId} has non-OK status: [${statusCode}] Reason: [${JSON.stringify(response.source)}]`
|
||||
);
|
||||
}
|
||||
|
||||
if (!response.isBoom) {
|
||||
response = response.header('accept-ranges', 'none');
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
require('@kbn/plugin-helpers').babelRegister();
|
||||
require('@kbn/test').runTestsCli([
|
||||
// require.resolve('../test/reporting/configs/chromium_api.js'),
|
||||
require.resolve('../test/reporting/configs/chromium_api.js'),
|
||||
// require.resolve('../test/reporting/configs/chromium_functional.js'),
|
||||
// require.resolve('../test/reporting/configs/phantom_api.js'),
|
||||
// require.resolve('../test/reporting/configs/phantom_functional.js'),
|
||||
|
|
|
@ -30,6 +30,7 @@ export async function getReportingApiConfig({ readConfigFile }) {
|
|||
serverArgs: [
|
||||
...apiConfig.get('kbnTestServer.serverArgs'),
|
||||
`--optimize.enabled=true`,
|
||||
'--logging.events.log', JSON.stringify(['info', 'warning', 'error', 'fatal', 'optimize', 'reporting'])
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
|
@ -22,7 +22,6 @@ export default async function ({ readConfigFile }) {
|
|||
...reportingApiConfig.kbnTestServer.serverArgs,
|
||||
`--xpack.reporting.capture.browser.type=chromium`,
|
||||
`--xpack.spaces.enabled=false`,
|
||||
`--logging.verbose=true`,
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
|
@ -21,9 +21,15 @@ export async function getFunctionalConfig({ readConfigFile }) {
|
|||
junit: {
|
||||
reportName: 'X-Pack Reporting Functional Tests',
|
||||
},
|
||||
kbnTestServer: xPackFunctionalTestsConfig.get('kbnTestServer'),
|
||||
kbnTestServer: {
|
||||
...xPackFunctionalTestsConfig.get('kbnTestServer'),
|
||||
serverArgs: [
|
||||
...xPackFunctionalTestsConfig.get('kbnTestServer.serverArgs'),
|
||||
'--logging.events.log', JSON.stringify(['info', 'warning', 'error', 'fatal', 'optimize', 'reporting'])
|
||||
],
|
||||
},
|
||||
testFiles: [require.resolve('../functional')],
|
||||
};
|
||||
}
|
||||
|
||||
export default getFunctionalConfig;
|
||||
export default getFunctionalConfig;
|
||||
|
|
|
@ -21,7 +21,6 @@ export default async function ({ readConfigFile }) {
|
|||
serverArgs: [
|
||||
...functionalConfig.kbnTestServer.serverArgs,
|
||||
`--xpack.reporting.capture.browser.type=phantom`,
|
||||
`--logging.verbose=true`,
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue