From 1f33d4620d50ca360df012bfbf4fdb34a5846e86 Mon Sep 17 00:00:00 2001 From: yueyang <2495544247@qq.com> Date: Tue, 22 Sep 2026 15:38:15 +0800 Subject: [PATCH 1/2] fix: configure supplier payable production storage --- compose.jiangling.yml | 1 + .../Unit/Deployment/BusinessMirrorScheduleTest.php | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/compose.jiangling.yml b/compose.jiangling.yml index d7ec45c0..b0971166 100644 --- a/compose.jiangling.yml +++ b/compose.jiangling.yml @@ -95,6 +95,7 @@ services: condition: service_healthy environment: RUN_MIGRATIONS: ${RUN_MIGRATIONS:-0} + SUPPLIER_PAYABLE_MAINTENANCE_DB_CONNECTION: business_mirror env_file: - ./runtime/qiniu-storage.env - ./runtime/clickhouse.env diff --git a/tests/Unit/Deployment/BusinessMirrorScheduleTest.php b/tests/Unit/Deployment/BusinessMirrorScheduleTest.php index bd09eae7..2d0d14c8 100644 --- a/tests/Unit/Deployment/BusinessMirrorScheduleTest.php +++ b/tests/Unit/Deployment/BusinessMirrorScheduleTest.php @@ -92,6 +92,19 @@ class BusinessMirrorScheduleTest extends TestCase } } + public function test_production_supplier_payable_maintenance_uses_the_business_mirror(): void + { + $compose = file_get_contents(dirname(__DIR__, 3) . '/compose.jiangling.yml'); + $start = strpos($compose, " app:\n"); + $end = strpos($compose, "\nvolumes:\n", $start); + $service = substr($compose, $start, $end - $start); + + $this->assertStringContainsString( + 'SUPPLIER_PAYABLE_MAINTENANCE_DB_CONNECTION: business_mirror', + $service, + ); + } + public function test_tunnel_task_accepts_both_missing_task_exception_types(): void { $contents = file_get_contents(dirname(__DIR__, 3) . '/scripts/install-upstream-tunnel-task.ps1'); -- 2.47.2 From ce15d567ae2bcd839d8f3536d4dcd6119664f2c0 Mon Sep 17 00:00:00 2001 From: yueyang <2495544247@qq.com> Date: Tue, 22 Sep 2026 16:05:04 +0800 Subject: [PATCH 2/2] fix: route jushuitan production storage --- compose.jiangling.yml | 1 + tests/CreatesApplication.php | 1 + tests/Unit/Deployment/BusinessMirrorScheduleTest.php | 1 + 3 files changed, 3 insertions(+) diff --git a/compose.jiangling.yml b/compose.jiangling.yml index b0971166..31d22d45 100644 --- a/compose.jiangling.yml +++ b/compose.jiangling.yml @@ -96,6 +96,7 @@ services: environment: RUN_MIGRATIONS: ${RUN_MIGRATIONS:-0} SUPPLIER_PAYABLE_MAINTENANCE_DB_CONNECTION: business_mirror + JST_DB_CONNECTION: business_mirror env_file: - ./runtime/qiniu-storage.env - ./runtime/clickhouse.env diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index b64b210c..a838f7a4 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -40,6 +40,7 @@ trait CreatesApplication config([ 'database.connections.business_mirror' => config('database.connections.sqlite'), 'database.supplier_payable_maintenance_connection' => 'sqlite', + 'jushuitan.connection' => 'business_mirror', 'upstream_mirrors.connection' => 'business_mirror', ]); $app->make(DatabaseManager::class)->purge('business_mirror'); diff --git a/tests/Unit/Deployment/BusinessMirrorScheduleTest.php b/tests/Unit/Deployment/BusinessMirrorScheduleTest.php index 2d0d14c8..48f7f8ae 100644 --- a/tests/Unit/Deployment/BusinessMirrorScheduleTest.php +++ b/tests/Unit/Deployment/BusinessMirrorScheduleTest.php @@ -103,6 +103,7 @@ class BusinessMirrorScheduleTest extends TestCase 'SUPPLIER_PAYABLE_MAINTENANCE_DB_CONNECTION: business_mirror', $service, ); + $this->assertStringContainsString('JST_DB_CONNECTION: business_mirror', $service); } public function test_tunnel_task_accepts_both_missing_task_exception_types(): void -- 2.47.2