diff --git a/.gitea/workflows/deploy-twilio.yaml b/.gitea/workflows/deploy-twilio.yaml index 92b98ea..25afca6 100644 --- a/.gitea/workflows/deploy-twilio.yaml +++ b/.gitea/workflows/deploy-twilio.yaml @@ -43,6 +43,9 @@ jobs: env: ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }} AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }} + + - name: Wait after 15s deploy staging + run: sleep 15s - name: run staging integration test run: bun integ-test:staging diff --git a/packages/doorman-api/src/common/TTLHelper.ts b/packages/doorman-api/src/common/TTLHelper.ts index 708e394..09b64a5 100644 --- a/packages/doorman-api/src/common/TTLHelper.ts +++ b/packages/doorman-api/src/common/TTLHelper.ts @@ -3,7 +3,7 @@ export function isTTLInFuture(item?: { TTL: number }) { return false; } - // ttl is a UTC ms time + // ttl is a UTC seconds time const ttl = item.TTL || 0; return parseInt("" + ttl) > getCurrentTimeInSeconds(); diff --git a/packages/doorman-api/tst/integ-staging.test.ts b/packages/doorman-api/tst/integ-staging.test.ts index 0d7d2d6..3a8affe 100644 --- a/packages/doorman-api/tst/integ-staging.test.ts +++ b/packages/doorman-api/tst/integ-staging.test.ts @@ -22,6 +22,10 @@ describe("buzzer client works", () => { }); test("sample e2e happy path", async () => { + // make sure it is locked + const lockResp = await fetch(baseUrl + `/api/door/status?door=${doorName}`); + expect(lockResp.status).toBe(200); + // unlock door const authResp = await fetch(baseUrl + `/api/door/auth?door=${doorName}&key=${key}`); expect(authResp.status).toBe(200);