fix: 恢复海外服务 Nacos 凭据注入

This commit is contained in:
2026-09-16 20:58:52 +08:00
parent 7ce662949b
commit c6797a8aad
4 changed files with 10 additions and 9 deletions
@@ -66,6 +66,9 @@ test('service map freezes unique internal ports and moves event bridge away from
test('overseas compose is isolated from CN defaults and disables implicit schema execution', async () => {
const compose = await read('deploy/docker-compose.overseas.yml')
assert.match(compose, /^name: firstleg-\$\{DEPLOY_ENV:-test\}-overseas$/m)
assert.match(compose, /NACOS_USERNAME: \$\{NACOS_USERNAME\}/)
assert.match(compose, /NACOS_PASSWORD: \$\{NACOS_PASSWORD\}/)
assert.doesNotMatch(compose, /OVERSEAS_NACOS_(?:USERNAME|PASSWORD)/)
assert.match(compose, /NACOS_NAMESPACE: \$\{OVERSEAS_NACOS_NAMESPACE:-prod-overseas\}/)
assert.match(compose, /REGION_CODE: OVERSEAS/)
assert.match(compose, /SPRING_SQL_INIT_MODE: never/)
@@ -136,7 +139,7 @@ test('CN and overseas event bridges have explicit opposite-region consumers', as
assert.match(scripts, /REMOTE_ENV_NAME="\.env\.\$PROJECT_NAME"/)
assert.match(scripts, /REMOTE_COMPOSE_NAME="docker-compose\.\$PROJECT_NAME\.yml"/)
for (const key of [
'NACOS_SERVER_ADDR', 'OVERSEAS_NACOS_NAMESPACE', 'INTERNAL_SERVICE_TOKEN',
'NACOS_SERVER_ADDR', 'NACOS_USERNAME', 'NACOS_PASSWORD', 'OVERSEAS_NACOS_NAMESPACE', 'INTERNAL_SERVICE_TOKEN',
'JWT_ISSUER', 'OVERSEAS_JWT_AUDIENCE', 'JWT_JWK_SET_URI'
]) assert.match(scripts, new RegExp(key))
})