Update chewy to version 8.0.1 (#37983)

This commit is contained in:
Matt Jankowski
2026-03-17 09:27:37 -04:00
committed by GitHub
parent 3d4364a2a6
commit 4d33490ec8
10 changed files with 38 additions and 22 deletions

View File

@@ -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

View 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

View File

@@ -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 }