From 6796d68012cea9beaebe03cd0702492054e60b51 Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Mon, 7 Sep 2026 14:59:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=AD=E5=8F=B0=E6=8E=A8=E5=B9=BF?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=85=A5=E7=94=9F=E4=BA=A7=E5=8F=97?= =?UTF-8?q?=E9=99=90=E9=9A=A7=E9=81=93=20(#110)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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();