summaryrefslogtreecommitdiff
path: root/spec/services/ci/retry_build_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/ci/retry_build_service_spec.rb')
-rw-r--r--spec/services/ci/retry_build_service_spec.rb29
1 files changed, 10 insertions, 19 deletions
diff --git a/spec/services/ci/retry_build_service_spec.rb b/spec/services/ci/retry_build_service_spec.rb
index 90c53d4a346..5a245415b32 100644
--- a/spec/services/ci/retry_build_service_spec.rb
+++ b/spec/services/ci/retry_build_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-describe Ci::RetryBuildService do
+RSpec.describe Ci::RetryBuildService do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, :repository) }
let_it_be(:pipeline) do
@@ -33,13 +33,13 @@ describe Ci::RetryBuildService do
job_artifacts_sast job_artifacts_secret_detection job_artifacts_dependency_scanning
job_artifacts_container_scanning job_artifacts_dast
job_artifacts_license_management job_artifacts_license_scanning
- job_artifacts_performance job_artifacts_lsif
- job_artifacts_terraform job_artifacts_cluster_applications
+ job_artifacts_performance job_artifacts_browser_performance job_artifacts_load_performance
+ job_artifacts_lsif job_artifacts_terraform job_artifacts_cluster_applications
job_artifacts_codequality job_artifacts_metrics scheduled_at
job_variables waiting_for_resource_at job_artifacts_metrics_referee
job_artifacts_network_referee job_artifacts_dotenv
job_artifacts_cobertura needs job_artifacts_accessibility
- job_artifacts_requirements].freeze
+ job_artifacts_requirements job_artifacts_coverage_fuzzing].freeze
ignore_accessors =
%i[type lock_version target_url base_tags trace_sections
@@ -279,25 +279,16 @@ describe Ci::RetryBuildService do
end
end
- context 'when scheduling_type of build is nil' do
+ context 'when build has needs' do
before do
- build.update_columns(scheduling_type: nil)
+ create(:ci_build_need, build: build, name: 'build1')
+ create(:ci_build_need, build: build, name: 'build2')
end
- context 'when build has not needs' do
- it 'sets scheduling_type as :stage' do
- expect(new_build.scheduling_type).to eq('stage')
- end
- end
+ it 'bulk inserts all needs' do
+ expect(Ci::BuildNeed).to receive(:bulk_insert!).and_call_original
- context 'when build has needs' do
- before do
- create(:ci_build_need, build: build)
- end
-
- it 'sets scheduling_type as :dag' do
- expect(new_build.scheduling_type).to eq('dag')
- end
+ new_build
end
end
end