import { FtrProviderContext } from '../../../ftr_provider_context' ; export default function ( { getService , loadTestFile } ) { const esArchiver = getService ( 'esArchiver' ) ; const ml = getService ( 'ml' ) ; const fleetPackages = [ 'apache' , 'nginx' ] ; const installedPackages = [ ] ; describe ( 'modules' , function ( ) { before ( async ( ) => { await esArchiver . load ( 'x-pack/test/functional/es_archives/empty_kibana' ) ; await ml . testResources . setupFleet ( ) ; for ( const fleetPackage of fleetPackages ) { const version = await ml . testResources . installFleetPackage ( fleetPackage ) ; installedPackages . push ( { pkgName : fleetPackage , version } ) ; } } ) ; after ( async ( ) => { for ( const fleetPackage of installedPackages ) { await ml . testResources . removeFleetPackage ( fleetPackage . pkgName , fleetPackage . version ) ; } await esArchiver . unload ( 'x-pack/test/functional/es_archives/empty_kibana' ) ; } ) ; loadTestFile ( require . resolve ( './get_module' ) ) ; loadTestFile ( require . resolve ( './recognize_module' ) ) ; loadTestFile ( require . resolve ( './setup_module' ) ) ; } ) ; }