diff --git a/src/lib/deploy-workflow-contract.test.ts b/src/lib/deploy-workflow-contract.test.ts index 1a561267..45545357 100644 --- a/src/lib/deploy-workflow-contract.test.ts +++ b/src/lib/deploy-workflow-contract.test.ts @@ -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);