Skip to content

Commit 53b0185

Browse files
committed
[API] Updates elasticsearch-api for elastic-transport
1 parent c7adfbc commit 53b0185

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

elasticsearch-api/Gemfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ if File.exist? File.expand_path("../../elasticsearch/elasticsearch.gemspec", __F
2424
gem 'elasticsearch', path: File.expand_path('../../elasticsearch', __FILE__), require: false
2525
end
2626

27-
if File.exist? File.expand_path('../../elasticsearch-transport', __FILE__)
28-
gem 'elasticsearch-transport', path: File.expand_path('../../elasticsearch-transport', __FILE__), require: true
29-
end
30-
3127
group :development do
3228
gem 'rspec'
3329
gem 'rspec_junit_formatter'

elasticsearch-api/api-spec-testing/rspec_matchers.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,12 @@ def compare_string_response(expected_string, response)
295295
message =~ /\[400\]/ ||
296296
actual_error.is_a?(ArgumentError)
297297
when 'unauthorized'
298-
actual_error.is_a?(Elasticsearch::Transport::Transport::Errors::Unauthorized)
298+
actual_error.is_a?(Elastic::Transport::Transport::Errors::Unauthorized)
299299
when 'forbidden'
300-
actual_error.is_a?(Elasticsearch::Transport::Transport::Errors::Forbidden)
300+
actual_error.is_a?(Elastic::Transport::Transport::Errors::Forbidden)
301301
when /error parsing field/
302302
message =~ /\[400\]/ ||
303-
actual_error.is_a?(Elasticsearch::Transport::Transport::Errors::BadRequest)
303+
actual_error.is_a?(Elastic::Transport::Transport::Errors::BadRequest)
304304
else
305305
message =~ /#{expected_error}/
306306
end

elasticsearch-api/api-spec-testing/test_file.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def setup
125125
begin
126126
action.execute(client)
127127
true
128-
rescue Elasticsearch::Transport::Transport::Errors::ServiceUnavailable => e
128+
rescue Elastic::Transport::Transport::Errors::ServiceUnavailable => e
129129
# The action sometimes gets the cluster in a recovering state, so we
130130
# retry a few times and then raise an exception if it's still
131131
# happening
@@ -403,7 +403,7 @@ def clear_snapshots_and_repositories(client)
403403
begin
404404
response = client.perform_request('DELETE', "_snapshot/#{repository}", ignore: [500, 404])
405405
client.snapshot.delete_repository(repository: repository, ignore: 404)
406-
rescue Elasticsearch::Transport::Transport::Errors::InternalServerError => e
406+
rescue Elastic::Transport::Transport::Errors::InternalServerError => e
407407
regexp = /indices that use the repository: \[docs\/([a-zA-Z0-9]+)/
408408
raise e unless response.body['error']['root_cause'].first['reason'].match(regexp)
409409

0 commit comments

Comments
 (0)