summaryrefslogtreecommitdiff
path: root/spec/requests/api/ci/runner/jobs_request_post_spec.rb
diff options
context:
space:
mode:
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.rb28
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