import { SPACES } from '../../common/lib/spaces' ; import { createTestSuiteFactory } from '../../common/suites/create' ; import { FtrProviderContext } from '../../common/ftr_provider_context' ; export default function createSpacesOnlySuite ( { getService } ) { const supertestWithoutAuth = getService ( 'supertestWithoutAuth' ) ; const esArchiver = getService ( 'esArchiver' ) ; const { createTest , expectNewSpaceResult , expectConflictResponse , expectReservedSpecifiedResult , } = createTestSuiteFactory ( esArchiver , supertestWithoutAuth ) ; describe ( 'create' , ( ) => { [ { spaceId : SPACES . DEFAULT . spaceId , } , { spaceId : SPACES . SPACE_1 . spaceId , } , ] . forEach ( ( scenario ) => { createTest ( `from the ${ scenario . spaceId } space` , { spaceId : scenario . spaceId , tests : { newSpace : { statusCode : 200 , response : expectNewSpaceResult , } , alreadyExists : { statusCode : 409 , response : expectConflictResponse , } , reservedSpecified : { statusCode : 200 , response : expectReservedSpecifiedResult , } , } , } ) ; } ) ; } ) ; }