From 49e0c7eb977bc8971a88e7ee01422c14cd328723 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 7 Aug 2019 19:31:22 +0200 Subject: Remove deprecated RPC code --- lib/gitlab/gitaly_client/notification_service.rb | 22 ---------------------- .../gitaly_client/notification_service_spec.rb | 17 ----------------- 2 files changed, 39 deletions(-) delete mode 100644 lib/gitlab/gitaly_client/notification_service.rb delete mode 100644 spec/lib/gitlab/gitaly_client/notification_service_spec.rb diff --git a/lib/gitlab/gitaly_client/notification_service.rb b/lib/gitlab/gitaly_client/notification_service.rb deleted file mode 100644 index 873c3e4086d..00000000000 --- a/lib/gitlab/gitaly_client/notification_service.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module GitalyClient - class NotificationService - # 'repository' is a Gitlab::Git::Repository - def initialize(repository) - @gitaly_repo = repository.gitaly_repository - @storage = repository.storage - end - - def post_receive - GitalyClient.call( - @storage, - :notification_service, - :post_receive, - Gitaly::PostReceiveRequest.new(repository: @gitaly_repo) - ) - end - end - end -end diff --git a/spec/lib/gitlab/gitaly_client/notification_service_spec.rb b/spec/lib/gitlab/gitaly_client/notification_service_spec.rb deleted file mode 100644 index ffc3a09be30..00000000000 --- a/spec/lib/gitlab/gitaly_client/notification_service_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'spec_helper' - -describe Gitlab::GitalyClient::NotificationService do - describe '#post_receive' do - let(:project) { create(:project) } - let(:storage_name) { project.repository_storage } - let(:relative_path) { project.disk_path + '.git' } - subject { described_class.new(project.repository) } - - it 'sends a post_receive message' do - expect_any_instance_of(Gitaly::NotificationService::Stub) - .to receive(:post_receive).with(gitaly_request_with_path(storage_name, relative_path), kind_of(Hash)) - - subject.post_receive - end - end -end -- cgit v1.2.1