summaryrefslogtreecommitdiff
path: root/spec/requests/rack_attack_global_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/rack_attack_global_spec.rb')
-rw-r--r--spec/requests/rack_attack_global_spec.rb28
1 files changed, 1 insertions, 27 deletions
diff --git a/spec/requests/rack_attack_global_spec.rb b/spec/requests/rack_attack_global_spec.rb
index ab0c76397e4..244ec111a0c 100644
--- a/spec/requests/rack_attack_global_spec.rb
+++ b/spec/requests/rack_attack_global_spec.rb
@@ -520,7 +520,7 @@ RSpec.describe 'Rack Attack global throttles', :use_clean_rails_memory_store_cac
let(:head_response) { { status: :success } }
before do
- allow_next_instance_of(DependencyProxy::FindOrCreateManifestService) do |instance|
+ allow_next_instance_of(DependencyProxy::FindCachedManifestService) do |instance|
allow(instance).to receive(:execute).and_return(pull_response)
end
allow_next_instance_of(DependencyProxy::HeadManifestService) do |instance|
@@ -720,19 +720,6 @@ RSpec.describe 'Rack Attack global throttles', :use_clean_rails_memory_store_cac
expect_rejection { do_request }
end
- context 'when feature flag is off' do
- before do
- stub_feature_flags(files_api_throttling: false)
- end
-
- it 'allows requests over the rate limit' do
- (1 + requests_per_period).times do
- do_request
- expect(response).to have_gitlab_http_status(:ok)
- end
- end
- end
-
context 'when unauthenticated api throttle is lower' do
before do
settings_to_set[:throttle_unauthenticated_api_requests_per_period] = 0
@@ -817,19 +804,6 @@ RSpec.describe 'Rack Attack global throttles', :use_clean_rails_memory_store_cac
expect_rejection { do_request }
end
end
-
- context 'when feature flag is off' do
- before do
- stub_feature_flags(files_api_throttling: false)
- end
-
- it 'allows requests over the rate limit' do
- (1 + requests_per_period).times do
- do_request
- expect(response).to have_gitlab_http_status(:ok)
- end
- end
- end
end
context 'when authenticated files api throttle is disabled' do