import { FtrProviderContext } from '../../../api_integration/ftr_provider_context' ; import { copyToSpaceTestSuiteFactory } from '../../common/suites/copy_to_space' ; export default function copyToSpacesOnlySuite ( { getService } ) { const supertestWithoutAuth = getService ( 'supertestWithoutAuth' ) ; const esArchiver = getService ( 'esArchiver' ) ; const es = getService ( 'es' ) ; const { copyToSpaceTest , expectNoConflictsWithoutReferencesResult , expectNoConflictsWithReferencesResult , expectNoConflictsForNonExistentSpaceResult , createExpectWithConflictsOverwritingResult , createExpectWithConflictsWithoutOverwritingResult , createMultiNamespaceTestCases , originSpaces , } = copyToSpaceTestSuiteFactory ( es , esArchiver , supertestWithoutAuth ) ; describe ( 'copy to spaces' , ( ) => { originSpaces . forEach ( ( spaceId ) => { copyToSpaceTest ( `from the ${ spaceId } space` , { spaceId , tests : { noConflictsWithoutReferences : { statusCode : 200 , response : expectNoConflictsWithoutReferencesResult ( spaceId ) , } , noConflictsWithReferences : { statusCode : 200 , response : expectNoConflictsWithReferencesResult ( spaceId ) , } , withConflictsOverwriting : { statusCode : 200 , response : createExpectWithConflictsOverwritingResult ( spaceId ) , } , withConflictsWithoutOverwriting : { statusCode : 200 , response : createExpectWithConflictsWithoutOverwritingResult ( spaceId ) , } , multipleSpaces : { statusCode : 200 , withConflictsResponse : createExpectWithConflictsOverwritingResult ( spaceId ) , noConflictsResponse : expectNoConflictsWithReferencesResult ( spaceId ) , } , nonExistentSpace : { statusCode : 200 , response : expectNoConflictsForNonExistentSpaceResult ( spaceId ) , } , multiNamespaceTestCases : createMultiNamespaceTestCases ( spaceId ) , } , } ) ; } ) ; } ) ; }