fix(deploy): clear EADDRINUSE orphans and update deploy contract tests
Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
540bce911f
commit
c433e5a52f
1 file changed
+7
-2
@@ -68,7 +68,10 @@ describe("production deploy workflow", () => {
|
||||
const stopAt = deployJob.indexOf("pm2 stop next");
|
||||
const migrateAt = deployJob.indexOf("pnpm db:migrate");
|
||||
const startLabelAt = deployJob.indexOf("Starting PM2");
|
||||
const startAt = deployJob.indexOf("pm2 reload next", startLabelAt);
|
||||
const startAt = deployJob.indexOf(
|
||||
"pm2 start pnpm --name next -- start",
|
||||
startLabelAt,
|
||||
);
|
||||
expect(buildAt).toBeGreaterThan(-1);
|
||||
expect(stopAt).toBeGreaterThan(buildAt);
|
||||
expect(migrateAt).toBeGreaterThan(stopAt);
|
||||
@@ -103,7 +106,9 @@ describe("production deploy workflow", () => {
|
||||
it("runs an HTTP health check before declaring deploy success", () => {
|
||||
expect(workflow).toContain("/api/health");
|
||||
expect(workflow).toContain('"database":true');
|
||||
const startAt = deployJob.indexOf("pm2 reload next");
|
||||
expect(deployJob).toContain("export PORT=");
|
||||
expect(deployJob).toContain("free_tcp_port");
|
||||
const startAt = deployJob.indexOf("pm2 start pnpm --name next -- start");
|
||||
const healthAt = deployJob.indexOf("/api/health");
|
||||
const successAt = deployJob.indexOf("--- Deployed successfully ---");
|
||||
expect(startAt).toBeGreaterThan(-1);
|
||||
|
||||
Reference in new issue
Block a user