Remove potentially noisy warning

- If Gitaly calls are missing, it could be due to a conditional and
may just become noise
This commit is contained in:
charlieablett 2019-06-19 14:37:54 +02:00
parent 8b809837f4
commit c99c30fdd6
2 changed files with 0 additions and 6 deletions

View File

@ -60,8 +60,6 @@ module Types
# involved with the request.
if @calls_gitaly && Gitlab::GitalyClient.get_request_count == 0
raise "Gitaly is called for field '#{name}' - please add `calls_gitaly: true` to the field declaration"
elsif !@calls_gitaly && Gitlab::GitalyClient.get_request_count > 0
raise "Gitaly not called for field '#{name}' - please remove `calls_gitaly: true` from the field declaration"
end
rescue => e
Gitlab::Sentry.track_exception(e)

View File

@ -127,10 +127,6 @@ describe Types::BaseField do
it 'does not raise an error if calls_gitaly is true' do
expect { gitaly_field.send(:calls_gitaly_check) }.not_to raise_error
end
it 'raises an error if calls_gitaly is not decalared' do
expect { no_gitaly_field.send(:calls_gitaly_check) }.to raise_error(/please remove `calls_gitaly: true`/)
end
end
end
end