diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/requests/api/ci/runner/jobs_request_post_spec.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/requests/api/ci/runner/jobs_request_post_spec.rb')
-rw-r--r-- | spec/requests/api/ci/runner/jobs_request_post_spec.rb | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/spec/requests/api/ci/runner/jobs_request_post_spec.rb b/spec/requests/api/ci/runner/jobs_request_post_spec.rb index 00c3a0a31af..adac81ff6f4 100644 --- a/spec/requests/api/ci/runner/jobs_request_post_spec.rb +++ b/spec/requests/api/ci/runner/jobs_request_post_spec.rb @@ -506,32 +506,12 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do end describe 'preloading job_artifacts_archive' do - context 'when the feature flag is disabled' do - before do - stub_feature_flags(preload_associations_jobs_request_api_endpoint: false) - end - - it 'queries the ci_job_artifacts table multiple times' do - expect { request_job }.to exceed_all_query_limit(1).for_model(::Ci::JobArtifact) - end - - it 'queries the ci_builds table more than three times' do - expect { request_job }.to exceed_all_query_limit(3).for_model(::Ci::Build) - end + it 'queries the ci_job_artifacts table once only' do + expect { request_job }.not_to exceed_all_query_limit(1).for_model(::Ci::JobArtifact) end - context 'when the feature flag is enabled' do - before do - stub_feature_flags(preload_associations_jobs_request_api_endpoint: true) - end - - it 'queries the ci_job_artifacts table once only' do - expect { request_job }.not_to exceed_all_query_limit(1).for_model(::Ci::JobArtifact) - end - - it 'queries the ci_builds table five times' do - expect { request_job }.not_to exceed_all_query_limit(5).for_model(::Ci::Build) - end + it 'queries the ci_builds table five times' do + expect { request_job }.not_to exceed_all_query_limit(5).for_model(::Ci::Build) end end end |