fix: connect overseas lastleg to print service

This commit is contained in:
2026-09-11 10:24:08 +08:00
parent 220d159cec
commit b2f85501ac
2 changed files with 10 additions and 0 deletions
+2
View File
@@ -65,6 +65,8 @@ services:
FIRSTLEG_EVENT_BRIDGE_URL: ${CN_EVENT_BRIDGE_TARGET_URL:-http://event-bridge-cn:9312}
DOMESTIC_WAREHOUSE_URL: ${DOMESTIC_WAREHOUSE_URL}
FILE_SERVICE_URL: ${FILE_SERVICE_URL}
# Print 注册在国内 Nacos namespace;海外服务通过共享 infra-network 的 Docker DNS 直连。
PRINT_SERVICE_URL: ${PRINT_SERVICE_URL:-http://print:9207}
WAREHOUSE_OVERSEAS_SERVICE_URL: ${WAREHOUSE_OVERSEAS_SERVICE_URL:-http://warehouse-overseas-service:9305}
warehouse-overseas-service:
@@ -72,6 +72,14 @@ class Phase4BrowserApiBoundaryTest {
assertTrue(yaml.contains("enabled: ${LASTLEG_SMART_DISPATCH_API_ENABLED:true}"));
}
@Test
void overseasLastlegReachesDomesticPrintThroughSharedInfrastructureNetwork() throws Exception {
Path composePath = Path.of("deploy/docker-compose.overseas.yml");
if (!Files.exists(composePath)) composePath = Path.of("..").resolve(composePath);
String compose = Files.readString(composePath);
assertTrue(compose.contains("PRINT_SERVICE_URL: ${PRINT_SERVICE_URL:-http://print:9207}"));
}
@Test
void smartDispatchOnlyExposesCandidatePreArrangeAndDraftLifecycleEndpoints() {
ConditionalOnProperty condition = SmartDispatchController.class.getAnnotation(ConditionalOnProperty.class);