This commit is contained in:
2026-08-20 20:29:51 +08:00
parent 11cfba880d
commit 5400a8e8e7
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -200,7 +200,7 @@ services:
EVENT_BRIDGE_DB_URL: ${EVENT_BRIDGE_DB_URL}
EVENT_BRIDGE_DB_USERNAME: ${EVENT_BRIDGE_DB_USERNAME}
EVENT_BRIDGE_DB_PASSWORD: ${EVENT_BRIDGE_DB_PASSWORD}
EVENT_CONSUMER_URL: ${EVENT_CONSUMER_URL:-http://firstleg:9202/internal/firstleg/v1/container-events}
EVENT_CONSUMER_URL: ${FIRSTLEG_CONTAINER_EVENT_CONSUMER_URL:-http://firstleg:9202/internal/firstleg/v1/container-events}
FIRSTLEG_CONTAINER_EVENT_CONSUMER_URL: ${FIRSTLEG_CONTAINER_EVENT_CONSUMER_URL:-http://firstleg:9202/internal/firstleg/v1/container-events}
SPRING_SQL_INIT_MODE: never
@@ -46,6 +46,8 @@ test('overseas compose is isolated from CN defaults and disables implicit schema
})
test('CN and overseas event bridges have explicit opposite-region consumers', async () => {
const cnCompose = await read('deploy/docker-compose.yml')
const overseasCompose = await read('deploy/docker-compose.overseas.yml')
const cn = await read('config/nacos/cn/event-bridge-service.yml')
const overseas = await read('config/nacos/overseas/event-bridge-service.yml')
const firstleg = await read('config/nacos/cn/firstleg-service.yml')
@@ -53,6 +55,8 @@ test('CN and overseas event bridges have explicit opposite-region consumers', as
const scripts = `${await read('deploy/scripts/deploy-built-service.sh')}\n${await read('deploy/scripts/deploy-services.sh')}`
assert.match(cn, /EVENT_CONSUMER_URL:http:\/\/firstleg:9202\/internal\/firstleg\/v1\/container-events/)
assert.match(overseas, /EVENT_CONSUMER_URL:http:\/\/lastleg-service:9303\/internal\/lastleg\/events/)
assert.match(cnCompose, /EVENT_CONSUMER_URL: \$\{FIRSTLEG_CONTAINER_EVENT_CONSUMER_URL:-http:\/\/firstleg:9202\/internal\/firstleg\/v1\/container-events\}/)
assert.match(overseasCompose, /EVENT_CONSUMER_URL: \$\{EVENT_CONSUMER_URL:-http:\/\/lastleg-service:9303\/internal\/lastleg\/events\}/)
assert.match(firstleg, /LASTLEG_EVENT_BRIDGE_URL/)
assert.match(firstleg, /LASTLEG_OUTBOX_RELAY_LEASE_SECONDS/)
assert.match(lastleg, /FIRSTLEG_EVENT_BRIDGE_URL/)