mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
Update chewy to version 8.0.1 (#37983)
This commit is contained in:
@@ -131,7 +131,7 @@ RSpec.describe Admin::SystemCheck::ElasticsearchCheck do
|
||||
|
||||
def stub_elasticsearch_error
|
||||
client = instance_double(Elasticsearch::Client)
|
||||
allow(client).to receive(:info).and_raise(Elasticsearch::Transport::Transport::Error)
|
||||
allow(client).to receive(:info).and_raise(Elastic::Transport::Transport::Error)
|
||||
allow(Chewy).to receive(:client).and_return(client)
|
||||
end
|
||||
end
|
||||
|
||||
14
spec/lib/elasticsearch/client_extensions_spec.rb
Normal file
14
spec/lib/elasticsearch/client_extensions_spec.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Elasticsearch::ClientExtensions do
|
||||
describe '#initialize' do
|
||||
it 'marks the connection as verified on initialization' do
|
||||
client = Elasticsearch::Client.new
|
||||
|
||||
expect(client.instance_variable_get(:@verified))
|
||||
.to be(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -36,7 +36,7 @@ RSpec.describe Mastodon::CLI::Search do
|
||||
context 'when server communication raises an error' do
|
||||
let(:options) { { reset_chewy: true } }
|
||||
|
||||
before { allow(Chewy::Stash::Specification).to receive(:reset!).and_raise(Elasticsearch::Transport::Transport::Errors::InternalServerError) }
|
||||
before { allow(Chewy::Stash::Specification).to receive(:reset!).and_raise(Elastic::Transport::Transport::Errors::InternalServerError) }
|
||||
|
||||
it 'Exits with error message' do
|
||||
expect { subject }
|
||||
|
||||
Reference in New Issue
Block a user