import { MlJob } from '@elastic/elasticsearch/lib/api/typesWithBodyKey' ; import { FtrProviderContext } from '../../../ftr_provider_context' ; export default function ( { loadTestFile } ) { describe ( 'job_audit_messages' , function ( ) { loadTestFile ( require . resolve ( './get_job_audit_messages' ) ) ; loadTestFile ( require . resolve ( './clear_messages' ) ) ; } ) ; } export const getJobConfig = ( numOfJobs ) => { return new Array ( numOfJobs ) . fill ( null ) . map ( ( v , i ) => ( { job_id : `test_get_job_audit_messages_${ i + 1 }` , description : 'job_audit_messages' , groups : [ 'farequote' , 'automated' , 'single-metric' ] , analysis_config : { bucket_span : '15m' , influencers : [ ] , detectors : [ { function : 'mean' , field_name : 'responsetime' , } , { function : 'min' , field_name : 'responsetime' , } , ] , } , data_description : { time_field : '@timestamp' } , analysis_limits : { model_memory_limit : '10mb' } , } as unknown as MlJob ) ) ; } ;