fix(deploy): support isolated temporary production release
This commit is contained in:
@@ -72,3 +72,15 @@ test('H5 proxy uses the shared gateway prefix and preserves API suffixes', async
|
||||
assert.equal(proxy['/gateway-api'].rewrite(`/gateway-api${suffix}`), `/api${suffix}`)
|
||||
}
|
||||
})
|
||||
|
||||
test('gray H5 runs on an isolated network with same-origin Gateway API', async () => {
|
||||
const compose = await read('../deploy/docker-compose.h5.production.yml')
|
||||
const nginx = await read('../deploy/nginx.production.conf.template')
|
||||
const docker = await read('../deploy/Dockerfile.h5.production')
|
||||
assert.match(compose, /name: firstleg-production-network/)
|
||||
assert.match(compose, /127\.0\.0\.1:/)
|
||||
assert.doesNotMatch(compose, /test-network|gateway-overseas/)
|
||||
assert.match(nginx, /location \/gateway-api\//)
|
||||
assert.ok(nginx.includes('proxy_pass ${API_UPSTREAM}/api/;'))
|
||||
assert.match(docker, /COPY deploy\/nginx.production.conf.template \/etc\/nginx\/templates\/default.conf.template/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user