diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 16:37:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 16:37:47 +0300 |
commit | aee0a117a889461ce8ced6fcf73207fe017f1d99 (patch) | |
tree | 891d9ef189227a8445d83f35c1b0fc99573f4380 /spec/requests/rack_attack_global_spec.rb | |
parent | 8d46af3258650d305f53b819eabf7ab18d22f59e (diff) |
Add latest changes from gitlab-org/gitlab@14-6-stable-eev14.6.0-rc42
Diffstat (limited to 'spec/requests/rack_attack_global_spec.rb')
-rw-r--r-- | spec/requests/rack_attack_global_spec.rb | 28 |
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 |