fix(GOV-009): 完成仅源码部署最终复审
This commit is contained in:
@@ -81,6 +81,20 @@ test('任一 Docker 活动文件会阻断源码发布', async () => {
|
||||
await assert.rejects(() => verifySourceDeployment(root), /禁止存在 Docker 活动文件.*Dockerfile/);
|
||||
});
|
||||
|
||||
test('未预先列举的 Dockerfile 和 Compose 文件仍会阻断源码发布', async () => {
|
||||
for (const relativePath of ['ops/Dockerfile', 'deploy/compose/extra.yml']) {
|
||||
const root = await createSourceReleaseFixture();
|
||||
const absolutePath = path.join(root, relativePath);
|
||||
await mkdir(path.dirname(absolutePath), { recursive: true });
|
||||
await writeFile(absolutePath, 'services: {}\n');
|
||||
|
||||
await assert.rejects(
|
||||
() => verifySourceDeployment(root),
|
||||
new RegExp(`禁止存在 Docker 活动文件.*${relativePath.replace('/', '\\/')}`),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test('Server 构建入口缺失会阻断源码发布', async () => {
|
||||
const root = await createSourceReleaseFixture({ omit: 'server/dist/apps/worker/main.js' });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user