import { FtrConfigProviderContext } from '@kbn/test' ; import { services } from './services' ; export async function getApiIntegrationConfig ( { readConfigFile } ) { const xPackFunctionalTestsConfig = await readConfigFile ( require . resolve ( '../functional/config.js' ) ) ; return { testFiles : [ require . resolve ( './apis' ) ] , services , servers : xPackFunctionalTestsConfig . get ( 'servers' ) , security : xPackFunctionalTestsConfig . get ( 'security' ) , junit : { reportName : 'X-Pack API Integration Tests' , } , kbnTestServer : { ... xPackFunctionalTestsConfig . get ( 'kbnTestServer' ) , serverArgs : [ ... xPackFunctionalTestsConfig . get ( 'kbnTestServer.serverArgs' ) , '--xpack.security.session.idleTimeout=3600000' , '--telemetry.optIn=true' , '--xpack.fleet.agents.pollingRequestTimeout=5000' , '--xpack.data_enhanced.search.sessions.enabled=true' , '--xpack.data_enhanced.search.sessions.notTouchedTimeout=15s' , '--xpack.data_enhanced.search.sessions.trackingInterval=5s' , '--xpack.data_enhanced.search.sessions.cleanupInterval=5s' , '--xpack.ruleRegistry.write.enabled=true' , '--xpack.ruleRegistry.write.enabled=true' , '--xpack.ruleRegistry.write.cache.enabled=false' , '--xpack.uptime.unsafe.service.enabled=true' , '--xpack.uptime.unsafe.service.password=test' , '--xpack.uptime.unsafe.service.manifestUrl=http://test.com' , '--xpack.uptime.unsafe.service.username=localKibanaIntegrationTestsUser' , `--xpack.securitySolution.enableExperimental=${ JSON . stringify ( [ 'ruleRegistryEnabled' ] ) }` , ] , } , esTestCluster : { ... xPackFunctionalTestsConfig . get ( 'esTestCluster' ) , serverArgs : [ ... xPackFunctionalTestsConfig . get ( 'esTestCluster.serverArgs' ) , 'node.attr.name=apiIntegrationTestNode' , 'path.repo=/tmp/repo,/tmp/repo_1,/tmp/repo_2,/tmp/cloud-snapshots/' , ] , } , } ; } export default getApiIntegrationConfig ;