提交 c99c30fd 编写于 作者: C charlieablett

Remove potentially noisy warning

- If Gitaly calls are missing, it could be due to a conditional and
may just become noise
上级 8b809837
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册