完成单机TEST统一入口与可靠投递回归收尾

This commit is contained in:
2026-09-29 19:48:34 +08:00
parent 64a70c9f28
commit 6c0a026cc4
89 changed files with 968 additions and 983 deletions
@@ -75,8 +75,19 @@ class PdaWarehouseContractTest {
"/api/pda/v1/last-leg/locations/resolve:", "/api/pda/v1/last-leg/pallets/resolve:",
"/api/pda/v1/last-leg/operations:")) assertThat(openapi).contains(path);
assertThat(openapi).doesNotContain("/api/pda/v1/last-leg/inbound-plans/{planNo}");
String gateway = Files.readString(Path.of("../gateway-overseas/src/main/resources/application-overseas.yml"));
assertThat(gateway).contains("/api/pda/v1/last-leg/**").contains("lb://lastleg-service");
String gateway = Files.readString(Path.of("../gateway/src/main/resources/application.yml"));
String lastlegRoute = gateway.substring(gateway.indexOf("- id: lastleg-service"),
gateway.indexOf("- id: warehouse-overseas-service"));
assertThat(lastlegRoute).contains("uri: lb://lastleg-service")
.contains("/api/pda/v1/last-leg/**")
.contains("/api/platform/v1/last-leg/**")
.contains("/api/merchant/v1/last-leg/**");
assertThat(gateway.lines().filter(line -> line.strip().startsWith("- Path=")))
.noneMatch(line -> line.contains("/internal/"));
assertThat(gateway).contains("allowed-headers: Authorization,")
.doesNotContain("gateway-overseas");
String nacos = Files.readString(Path.of("../config/nacos/test/gateway.yml"));
assertThat(nacos).doesNotContain("routes:"); // Shared source routes must not be replaced by a partial regional list.
}
private static AuthenticatedUser user(Set<String> authorities, Long warehouseId) {