fix: keep BaoTa reverse proxies on stable ports
This commit is contained in:
@@ -14,6 +14,7 @@ test('all backend business services have blue-green runtime contracts', async ()
|
||||
]) assert.match(script, new RegExp(`${service.replaceAll('-', '\\-')}:`))
|
||||
|
||||
assert.match(script, /target_slot="green"/)
|
||||
assert.match(script, /target_port=\$\(\(BASE_PORT \+ 20000\)\)/)
|
||||
assert.match(script, /target_port=\$\(\(BASE_PORT \+ 10000\)\)/)
|
||||
assert.match(script, /compose run -d --no-deps --name "\$candidate"/)
|
||||
assert.match(script, /wait_for_container "\$candidate"/)
|
||||
@@ -43,8 +44,9 @@ test('candidate failure keeps the active container and successful cutover stops
|
||||
|
||||
test('gateway cutover is atomic and restores nginx config on validation failure', async () => {
|
||||
const script = await read('deploy/scripts/deploy-blue-green-service.sh')
|
||||
assert.match(script, /api-cn\.buggoglobal\.com\.conf/)
|
||||
assert.match(script, /api-global\.buggoglobal\.com\.conf/)
|
||||
assert.match(script, /00-blue-green-gateway\.conf/)
|
||||
assert.match(script, /00-blue-green-gateway-overseas\.conf/)
|
||||
assert.doesNotMatch(script, /api-cn\.buggoglobal\.com\.conf|api-global\.buggoglobal\.com\.conf/)
|
||||
assert.match(script, /尚未完成首次蓝绿迁移,拒绝切换 Gateway/)
|
||||
assert.match(script, /frontend-\$frontend_service\.active/)
|
||||
assert.match(script, /尚未使用稳定上游 \$required_alias,拒绝切换 Gateway/)
|
||||
|
||||
Reference in New Issue
Block a user