expect_any_instance_of(Gitlab::Shell).toreceive(:import_repository).with(project.path_with_namespace,project.import_url).and_raise(Gitlab::Shell::Error.new('Failed to import the repository'))
result=subject.execute
expect(result[:status]).toeq:error
expect(result[:message]).toeq'Failed to import the repository'
expect_any_instance_of(Gitlab::GithubImport::Importer).toreceive(:execute).and_raise(Projects::ImportService::Error.new('Github: failed to connect API'))
result=subject.execute
expect(result[:status]).toeq:error
expect(result[:message]).toeq'Github: failed to connect API'