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:
Diffstat (limited to 'lib/gitlab/ci/reports/reports_comparer.rb')
-rw-r--r--lib/gitlab/ci/reports/reports_comparer.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/gitlab/ci/reports/reports_comparer.rb b/lib/gitlab/ci/reports/reports_comparer.rb
index d413d3a74f6..16a7f6478b7 100644
--- a/lib/gitlab/ci/reports/reports_comparer.rb
+++ b/lib/gitlab/ci/reports/reports_comparer.rb
@@ -8,6 +8,7 @@ module Gitlab
STATUS_SUCCESS = 'success'
STATUS_FAILED = 'failed'
+ STATUS_NOT_FOUND = 'not_found'
attr_reader :base_report, :head_report
@@ -17,7 +18,13 @@ module Gitlab
end
def status
- success? ? STATUS_SUCCESS : STATUS_FAILED
+ if base_report.nil? || head_report.nil?
+ STATUS_NOT_FOUND
+ elsif success?
+ STATUS_SUCCESS
+ else
+ STATUS_FAILED
+ end
end
def success?
@@ -47,6 +54,10 @@ module Gitlab
def total_count
existing_errors.size + new_errors.size
end
+
+ def not_found?
+ status == STATUS_NOT_FOUND
+ end
end
end
end