Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiger <twatson@gitlab.com>2019-03-04 02:56:20 +0300
committerTiger <twatson@gitlab.com>2019-03-20 04:04:40 +0300
commit00f0d356b71fa87f8190810b01add0cc4586e90a (patch)
treee6b59c822bba6db3ea1e80079e644d010b84f806 /spec/requests
parent42ca9c6f0de34dfa7ae09cc0e9672ea5857afd38 (diff)
Create framework for build prerequisites
Introduces the concept of Prerequisites for a CI build. If a build has unmet prerequisites it will go through the :preparing state before being made available to a runner. There are no actual prerequisites yet, so current behaviour is unchanged.
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/runner_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb
index 9087cccb759..3ccedd8dd06 100644
--- a/spec/requests/api/runner_spec.rb
+++ b/spec/requests/api/runner_spec.rb
@@ -918,6 +918,15 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
it { expect(job).to be_job_execution_timeout }
end
+
+ context 'when failure_reason is unmet_prerequisites' do
+ before do
+ update_job(state: 'failed', failure_reason: 'unmet_prerequisites')
+ job.reload
+ end
+
+ it { expect(job).to be_unmet_prerequisites }
+ end
end
context 'when trace is given' do