From 48ac8889716f9f84d793f9a5ff0721009534a06a Mon Sep 17 00:00:00 2001 From: Philipp Thun Date: Mon, 4 May 2026 16:58:43 +0200 Subject: [PATCH] Fix MySQL backwards compatibility test failure Sequel::Postgres::Dataset is only defined when the postgres adapter is loaded. In regular CI, the case_insensitive_string_monkeypatch requires sequel/adapters/postgres unconditionally, making the constant available even in MySQL runs. The backwards compatibility tests skip migrations (NO_DB_MIGRATION=true), so the monkeypatch is never loaded and the constant is undefined. Use Sequel::Dataset instead, which is always available and sufficient for the mock (it only needs .update). --- spec/unit/jobs/v3/services/update_broker_job_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/unit/jobs/v3/services/update_broker_job_spec.rb b/spec/unit/jobs/v3/services/update_broker_job_spec.rb index 5df51efb7b8..e049c9cd53e 100644 --- a/spec/unit/jobs/v3/services/update_broker_job_spec.rb +++ b/spec/unit/jobs/v3/services/update_broker_job_spec.rb @@ -448,7 +448,7 @@ module V3 context 'when database disconnects during state rollback' do let(:catalog_error) { StandardError.new('Catalog fetch failed') } - let(:mock_dataset) { instance_double(Sequel::Postgres::Dataset) } + let(:mock_dataset) { instance_double(Sequel::Dataset) } before do allow_any_instance_of(VCAP::CloudController::V3::ServiceBrokerCatalogUpdater).to receive(:refresh).and_raise(catalog_error)