Skip to content
Snippets Groups Projects
Commit 6171db2d authored by Shinya Maeda's avatar Shinya Maeda
Browse files

Fix /build_spec.rb

parent 38d46754
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -490,6 +490,14 @@ module Ci
end
end
 
def valid_dependency?
return false unless complete?
return false if artifacts_expired?
return false if erased?
true
end
def hide_secrets(trace)
return unless trace
 
Loading
Loading
@@ -600,13 +608,5 @@ module Ci
update_project_statistics
end
end
def valid_dependency?
return false unless complete?
return false if artifacts_expired?
return false if erased?
true
end
end
end
Loading
Loading
@@ -1869,6 +1869,10 @@ describe Ci::Build do
end
 
describe 'state transition: any => [:running]' do
before do
stub_feature_flags(ci_validates_dependencies: true)
end
let(:build) { create(:ci_build, :pending, pipeline: pipeline, stage_idx: 1, options: options) }
 
context 'when "dependencies" keyword is not defined' do
Loading
Loading
@@ -1887,13 +1891,14 @@ describe Ci::Build do
let(:options) { { dependencies: ['test'] } }
 
context 'when a depended job exists' do
let!(:pre_stage_job) { create(:ci_build, pipeline: pipeline, name: 'test', stage_idx: 0) }
let!(:pre_stage_job) { create(:ci_build, :success, pipeline: pipeline, name: 'test', stage_idx: 0) }
 
it { expect { build.run! }.not_to raise_error }
 
context 'when "artifacts" keyword is specified on depended job' do
let!(:pre_stage_job) do
create(:ci_build,
:success,
:artifacts,
pipeline: pipeline,
name: 'test',
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment