summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/instrumentation_helper_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/instrumentation_helper_spec.rb')
-rw-r--r--spec/lib/gitlab/instrumentation_helper_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/instrumentation_helper_spec.rb b/spec/lib/gitlab/instrumentation_helper_spec.rb
index 35bbdcdccd6..88f2def34d9 100644
--- a/spec/lib/gitlab/instrumentation_helper_spec.rb
+++ b/spec/lib/gitlab/instrumentation_helper_spec.rb
@@ -97,6 +97,16 @@ RSpec.describe Gitlab::InstrumentationHelper do
expect(payload[:gitaly_duration]).to be_nil
end
end
+
+ context 'when the request matched a Rack::Attack safelist' do
+ it 'logs the safelist name' do
+ Gitlab::Instrumentation::Throttle.safelist = 'foobar'
+
+ subject
+
+ expect(payload[:throttle_safelist]).to eq('foobar')
+ end
+ end
end
describe '.queue_duration_for_job' do