test(deploy): verify unified TEST and gray environment contracts
This commit is contained in:
+2
-2
@@ -74,7 +74,7 @@ class Phase4BrowserApiBoundaryTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void lastlegReachesPrintThroughTheUnifiedTestNetwork() throws Exception {
|
||||
void lastlegReachesPrintThroughTheUnifiedEnvironmentNetwork() throws Exception {
|
||||
Path composePath = Path.of("deploy/docker-compose.yml");
|
||||
if (!Files.exists(composePath)) composePath = Path.of("..").resolve(composePath);
|
||||
String compose = Files.readString(composePath);
|
||||
@@ -83,7 +83,7 @@ class Phase4BrowserApiBoundaryTest {
|
||||
assertTrue(lastleg.contains("<<: *common-environment"));
|
||||
assertTrue(lastleg.contains("PRINT_SERVICE_URL: ${PRINT_SERVICE_URL:-http://print:9207}"));
|
||||
assertTrue(compose.contains("networks: [firstleg-network, infra-network]"));
|
||||
assertTrue(compose.contains("name: firstleg-test-network"));
|
||||
assertTrue(compose.contains("name: firstleg-${DEPLOY_ENV:-test}-network"));
|
||||
assertFalse(lastleg.contains("ports:"));
|
||||
assertFalse(compose.contains("gateway-overseas"));
|
||||
}
|
||||
|
||||
+2
-2
@@ -49,12 +49,12 @@ class DomesticPartnerWarehouseClientContractTest {
|
||||
.doesNotContain("ports:");
|
||||
assertThat(compose).contains("INTERNAL_SERVICE_TOKEN: ${INTERNAL_SERVICE_TOKEN}")
|
||||
.contains("NACOS_USERNAME: ${NACOS_USERNAME}")
|
||||
.contains("NACOS_NAMESPACE: ${NACOS_NAMESPACE:?actual TEST namespace ID required}")
|
||||
.contains("NACOS_NAMESPACE: ${NACOS_NAMESPACE:?actual environment namespace ID required}")
|
||||
.contains("JWT_JWKS_URI: http://auth:9100/api/auth/.well-known/jwks.json")
|
||||
.doesNotContain("OVERSEAS_NACOS_NAMESPACE", "OVERSEAS_NACOS_USERNAME", "FIRSTLEG_EVENT_BRIDGE_URL");
|
||||
assertThat(common).contains("session-mode: redis")
|
||||
.contains("jwk-set-uri: ${JWT_JWKS_URI:http://auth:9100/api/auth/.well-known/jwks.json}");
|
||||
assertThat(deploy).contains("Only test is supported")
|
||||
assertThat(deploy).contains("Only test and production are supported")
|
||||
.contains("NACOS_SERVER_ADDR NACOS_NAMESPACE NACOS_USERNAME NACOS_PASSWORD")
|
||||
.contains("REDIS_TOKEN_KEY_PREFIX INTERNAL_SERVICE_TOKEN")
|
||||
.contains("lastleg-service) db_prefix=LASTLEG");
|
||||
|
||||
Reference in New Issue
Block a user