import { FtrConfigProviderContext } from '@kbn/test' ; import { resolve } from 'path' ; import { ReportingAPIProvider } from './services' ; export default async function ( { readConfigFile } ) { const apiConfig = await readConfigFile ( require . resolve ( '../api_integration/config' ) ) ; 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.screenshotting.networkPolicy.rules=${ JSON . stringify ( testPolicyRules ) }` , `--xpack.reporting.capture.maxAttempts=1` , `--xpack.reporting.csv.maxSizeBytes=6000` , '--xpack.reporting.roles.enabled=false' , ] , } , } ; }