From 48f798f602e0d64e25410c861f339e053891e4e7 Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Mon, 7 Sep 2026 14:58:55 +0800 Subject: [PATCH] fix: route promotion source through production tunnel --- config/upstreams.php | 4 ++++ tests/Feature/SystemSettings/UpstreamDatabasesTest.php | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/config/upstreams.php b/config/upstreams.php index 58499932..25aad75c 100644 --- a/config/upstreams.php +++ b/config/upstreams.php @@ -48,6 +48,10 @@ return [ 'host' => env('UPSTREAM_TUNNEL_OPERATIONS_REPLICA_HOST'), 'port' => env('UPSTREAM_TUNNEL_OPERATIONS_REPLICA_PORT'), ], + 'js_data_middle_platform' => [ + 'host' => env('UPSTREAM_TUNNEL_JS_DATA_MIDDLE_PLATFORM_HOST'), + 'port' => env('UPSTREAM_TUNNEL_JS_DATA_MIDDLE_PLATFORM_PORT'), + ], ], 'local_configuration' => [ diff --git a/tests/Feature/SystemSettings/UpstreamDatabasesTest.php b/tests/Feature/SystemSettings/UpstreamDatabasesTest.php index 254257fc..ea350757 100644 --- a/tests/Feature/SystemSettings/UpstreamDatabasesTest.php +++ b/tests/Feature/SystemSettings/UpstreamDatabasesTest.php @@ -262,6 +262,16 @@ class UpstreamDatabasesTest extends FeatureTestCase } } + public function test_js_data_middle_platform_declares_a_private_production_tunnel_endpoint(): void + { + $contents = file_get_contents(config_path('upstreams.php')); + + $this->assertIsString($contents); + $this->assertStringContainsString("'js_data_middle_platform' => [", $contents); + $this->assertStringContainsString("env('UPSTREAM_TUNNEL_JS_DATA_MIDDLE_PLATFORM_HOST')", $contents); + $this->assertStringContainsString("env('UPSTREAM_TUNNEL_JS_DATA_MIDDLE_PLATFORM_PORT')", $contents); + } + public function test_global_wildcard_scope_is_rejected(): void { $this->withExceptionHandling(); -- 2.47.2