Commit 70982bb4 authored by Kim "BKC" Carlbäcker's avatar Kim "BKC" Carlbäcker

Hopefully this works

parent 47907a41
...@@ -456,7 +456,7 @@ module Gitlab ...@@ -456,7 +456,7 @@ module Gitlab
def ref_name_for_sha(ref_path, sha) def ref_name_for_sha(ref_path, sha)
Gitlab::GitalyClient.migrate(:find_ref_name) do |is_enabled| Gitlab::GitalyClient.migrate(:find_ref_name) do |is_enabled|
if is_enabled if is_enabled
Gitlab::GitalyClient::Ref.find_ref_name(self, sha, ref_path) gitaly_ref_client.find_ref_name(sha, ref_path)
else else
args = %W(#{Gitlab.config.git.bin_path} for-each-ref --count=1 #{ref_path} --contains #{sha}) args = %W(#{Gitlab.config.git.bin_path} for-each-ref --count=1 #{ref_path} --contains #{sha})
......
...@@ -116,7 +116,7 @@ describe Environment, models: true do ...@@ -116,7 +116,7 @@ describe Environment, models: true do
end end
it 'calls GitalyClient' do it 'calls GitalyClient' do
expect(Gitlab::GitalyClient::Ref).to receive(:find_ref_name).with(project.repository.raw_repository, commit.id, environment.ref_path) expect_any_instance_of(Gitlab::GitalyClient::Ref).to receive(:find_ref_name)
environment.first_deployment_for(commit) environment.first_deployment_for(commit)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment