Skip to content

Commit 1bd73c9

Browse files
authored
[ci] fix bad citizens detection (#3020)
* [ci] fix bad citizens detection Ternary operation has a high priority in Ruby. Also add a short comment about the meaning of the bad citizens. * [ci] mongo is a good citizen Check name and Travis check are the same.
1 parent 06eb38a commit 1bd73c9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ci/common.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def travis_pr?
4242
!ENV['TRAVIS'].nil? && ENV['TRAVIS_EVENT_TYPE'] == 'pull_request'
4343
end
4444

45+
# Dict converting check.d name to Travis flavor names
4546
BAD_CITIZENS = {
4647
'couch' => 'couchdb',
4748
'disk' => 'system',
@@ -51,7 +52,6 @@ def travis_pr?
5152
'sysstat' => 'system',
5253
'elastic' => 'elasticsearch',
5354
'gearmand' => 'gearman',
54-
'mongo' => 'mongodb',
5555
'mcache' => 'memcache',
5656
'php_fpm' => 'phpfpm',
5757
'redisdb' => 'redis',
@@ -61,7 +61,8 @@ def travis_pr?
6161

6262
def translate_to_travis(checks)
6363
checks.map do |check_name|
64-
BAD_CITIZENS.key? check_name ? BAD_CITIZENS[check_name] : check_name
64+
check_name = BAD_CITIZENS[check_name] if BAD_CITIZENS.key? check_name
65+
check_name
6566
end
6667
end
6768

0 commit comments

Comments
 (0)