summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-08-03 17:19:27 +0900
committerShinya Maeda <shinya@gitlab.com>2018-08-03 17:19:27 +0900
commitc8f13cc5bd4fbd7b9e2bab1bdded73a080a29255 (patch)
tree6ac918fe288c5e9b74e21b7c771a16bcc61f82a8 /lib/gitlab/ci
parent85af3ea21a5a772cb22756190268ba3f921a6400 (diff)
downloadgitlab-ce-c8f13cc5bd4fbd7b9e2bab1bdded73a080a29255.tar.gz
Fix existing key logic in test suite
Diffstat (limited to 'lib/gitlab/ci')
-rw-r--r--lib/gitlab/ci/reports/test_suite.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/ci/reports/test_suite.rb b/lib/gitlab/ci/reports/test_suite.rb
index 7b19bb571d9..b722d0ba735 100644
--- a/lib/gitlab/ci/reports/test_suite.rb
+++ b/lib/gitlab/ci/reports/test_suite.rb
@@ -14,7 +14,7 @@ module Gitlab
end
def add_test_case(test_case)
- @duplicate_cases << test_case unless unique_key?(test_case)
+ @duplicate_cases << test_case if existing_key?(test_case)
@test_cases[test_case.status] ||= {}
@test_cases[test_case.status][test_case.key] = test_case
@@ -45,7 +45,7 @@ module Gitlab
private
- def unique_key?(test_case)
+ def existing_key?(test_case)
@test_cases[test_case.status]&.key?(test_case.key)
end
end