import { FtrConfigProviderContext } from '@kbn/test' ; interface Settings { license : 'basic' | 'trial' ; testFiles : string [ ] ; name : string ; } export function createTestConfig ( settings ) { const { testFiles , license , name } = settings ; return async ( { readConfigFile } ) => { const xPackAPITestsConfig = await readConfigFile ( require . resolve ( '../../api_integration/config.ts' ) ) ; return { testFiles , servers : xPackAPITestsConfig . get ( 'servers' ) , services : xPackAPITestsConfig . get ( 'services' ) , junit : { reportName : name , } , esTestCluster : { ... xPackAPITestsConfig . get ( 'esTestCluster' ) , license , } , kbnTestServer : xPackAPITestsConfig . get ( 'kbnTestServer' ) , } ; } ; }