import { SPACES } from '../../common/lib/spaces' ; import { deleteTestSuiteFactory } from '../../common/suites/delete' ; import { FtrProviderContext } from '../../common/ftr_provider_context' ; export default function deleteSpaceTestSuite ( { getService } ) { const supertestWithoutAuth = getService ( 'supertestWithoutAuth' ) ; const esArchiver = getService ( 'esArchiver' ) ; const es = getService ( 'es' ) ; const { deleteTest , expectEmptyResult , expectReservedSpaceResult , expectNotFound } = deleteTestSuiteFactory ( es , esArchiver , supertestWithoutAuth ) ; describe ( 'delete' , ( ) => { [ { spaceId : SPACES . DEFAULT . spaceId , } , { spaceId : SPACES . SPACE_1 . spaceId , } , ] . forEach ( ( scenario ) => { deleteTest ( `from the ${ scenario . spaceId } space` , { spaceId : scenario . spaceId , tests : { exists : { statusCode : 204 , response : expectEmptyResult , } , reservedSpace : { statusCode : 400 , response : expectReservedSpaceResult , } , doesntExist : { statusCode : 404 , response : expectNotFound , } , } , } ) ; } ) ; } ) ; }