summaryrefslogtreecommitdiff
path: root/spec/requests/api/runner_spec.rb
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-10-26 08:01:28 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2018-10-26 08:01:28 +0000
commit0c9ad4826a79fa6d1cbbf8c4b1e12af9e4443515 (patch)
tree5f394df7397dbebc146514340955165fc8450a75 /spec/requests/api/runner_spec.rb
parent2bbfca8240c605e3b1c4aed18cadda4f6403e138 (diff)
downloadgitlab-ce-0c9ad4826a79fa6d1cbbf8c4b1e12af9e4443515.tar.gz
Support backward compatibility when introduce new failure reason
Diffstat (limited to 'spec/requests/api/runner_spec.rb')
-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 43ceb332cfb..c0d5a3ad74b 100644
--- a/spec/requests/api/runner_spec.rb
+++ b/spec/requests/api/runner_spec.rb
@@ -797,6 +797,15 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
it { expect(job).to be_runner_system_failure }
end
+
+ context 'when failure_reason is unrecognized value' do
+ before do
+ update_job(state: 'failed', failure_reason: 'what_is_this')
+ job.reload
+ end
+
+ it { expect(job).to be_unknown_failure }
+ end
end
context 'when trace is given' do