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:
authorMayra Cabrera <mcabrera@gitlab.com>2018-05-24 23:06:58 +0300
committerMayra Cabrera <mcabrera@gitlab.com>2018-05-24 23:14:28 +0300
commit0bc9e0b4feb746f1b9fe233bfbb6e9afd70e0b98 (patch)
treeb90da44160f55716df9574000ed944a91935f40f /spec/serializers
parentba58a66a55e2270eb46f7429e070d16f77d25b9d (diff)
Removes redundant error message for script failures
Script failure message was redundant so it was removed. Also 'check your job log' message was removed from all the error messages. Closes #44271
Diffstat (limited to 'spec/serializers')
-rw-r--r--spec/serializers/job_entity_spec.rb25
1 files changed, 17 insertions, 8 deletions
diff --git a/spec/serializers/job_entity_spec.rb b/spec/serializers/job_entity_spec.rb
index c90396ebb28..a5581a34517 100644
--- a/spec/serializers/job_entity_spec.rb
+++ b/spec/serializers/job_entity_spec.rb
@@ -131,7 +131,7 @@ describe JobEntity do
end
context 'when job failed' do
- let(:job) { create(:ci_build, :script_failure) }
+ let(:job) { create(:ci_build, :api_failure) }
it 'contains details' do
expect(subject[:status]).to include :icon, :favicon, :text, :label, :tooltip
@@ -142,20 +142,20 @@ describe JobEntity do
end
it 'should indicate the failure reason on tooltip' do
- expect(subject[:status][:tooltip]).to eq('failed <br> (script failure)')
+ expect(subject[:status][:tooltip]).to eq('failed <br> (API failure)')
end
it 'should include a callout message with a verbose output' do
- expect(subject[:callout_message]).to eq('There has been a script failure. Check the job log for more information')
+ expect(subject[:callout_message]).to eq('There has been an API failure, please try again')
end
it 'should state that it is not recoverable' do
- expect(subject[:recoverable]).to be_falsy
+ expect(subject[:recoverable]).to be_truthy
end
end
context 'when job is allowed to fail' do
- let(:job) { create(:ci_build, :allowed_to_fail, :script_failure) }
+ let(:job) { create(:ci_build, :allowed_to_fail, :api_failure) }
it 'contains details' do
expect(subject[:status]).to include :icon, :favicon, :text, :label, :tooltip
@@ -166,15 +166,24 @@ describe JobEntity do
end
it 'should indicate the failure reason on tooltip' do
- expect(subject[:status][:tooltip]).to eq('failed <br> (script failure) (allowed to fail)')
+ expect(subject[:status][:tooltip]).to eq('failed <br> (API failure) (allowed to fail)')
end
it 'should include a callout message with a verbose output' do
- expect(subject[:callout_message]).to eq('There has been a script failure. Check the job log for more information')
+ expect(subject[:callout_message]).to eq('There has been an API failure, please try again')
end
it 'should state that it is not recoverable' do
- expect(subject[:recoverable]).to be_falsy
+ expect(subject[:recoverable]).to be_truthy
+ end
+ end
+
+ context 'when the job failed with a script failure' do
+ let(:job) { create(:ci_build, :failed, :script_failure) }
+
+ it 'should not include callout message or recoverable keys' do
+ expect(subject).not_to include('callout_message')
+ expect(subject).not_to include('recoverable')
end
end