Skip to content

Commit 94268b5

Browse files
committed
[CI] Test Runner - Exit when can't connect to ES Cluster
1 parent b8cfca5 commit 94268b5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

elasticsearch-api/spec/rest_api_tests_helper.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@
5353
)
5454
end
5555

56+
unless ADMIN_CLIENT.ping
57+
raise('Couldn\'t connect to Elasticsearch cluster')
58+
exit
59+
end
60+
5661
YAML_FILES_DIRECTORY = "#{PROJECT_PATH}/../tmp/rest-api-spec/test/#{test_suite}".freeze
5762

5863
SINGLE_TEST = if ENV['SINGLE_TEST'] && !ENV['SINGLE_TEST'].empty?

0 commit comments

Comments
 (0)