fix: ensure default calendars api v2 (#27603)

* fix: ensure default calendars

* test: add E2E tests for delegation credential controller and update tasker config

- Add E2E tests to verify ensureDefaultCalendars is called when enabling delegation credentials
- Update calendars tasker config to use medium-1x machine for retry on OOM
- Set minimum retry backoff to 60 seconds (1 minute between retries)

Co-Authored-By: morgan@cal.com <morgan@cal.com>

* fix: update tasker config to use small-2x machine with outOfMemory retry on medium-1x

Co-Authored-By: morgan@cal.com <morgan@cal.com>

* fix: update E2E tests to properly spy on service instance and use valid workspace platform slug

Co-Authored-By: morgan@cal.com <morgan@cal.com>

* ci: add CALCOM_SERVICE_ACCOUNT_ENCRYPTION_KEY to E2E API v2 workflow

Co-Authored-By: morgan@cal.com <morgan@cal.com>

* fix: add encryption key to E2E test file for delegation credentials

Co-Authored-By: morgan@cal.com <morgan@cal.com>

* revert: remove CALCOM_SERVICE_ACCOUNT_ENCRYPTION_KEY from workflow (moved to test file)

Co-Authored-By: morgan@cal.com <morgan@cal.com>

* fix: move encryption key to setEnvVars.ts for E2E tests

Co-Authored-By: morgan@cal.com <morgan@cal.com>

* fix: use valid format for service account encryption key

Co-Authored-By: morgan@cal.com <morgan@cal.com>

* fix: encrypt service account key in E2E test for delegation credentials

Co-Authored-By: morgan@cal.com <morgan@cal.com>

* fix: mock updateDelegationCredentialEnabled to bypass Google API call in E2E tests

Co-Authored-By: morgan@cal.com <morgan@cal.com>

* fix: get service from app.get() after initialization for proper spy setup in E2E tests

Co-Authored-By: morgan@cal.com <morgan@cal.com>

* fix: use jest.mock() to mock toggleDelegationCredentialEnabled and bypass Google API calls in E2E tests

Co-Authored-By: morgan@cal.com <morgan@cal.com>

* fix: use Service.prototype pattern for spying on ensureDefaultCalendars in E2E tests

Co-Authored-By: morgan@cal.com <morgan@cal.com>

* fix: move spy setup to beforeAll before app.init() for proper NestJS interception

Co-Authored-By: morgan@cal.com <morgan@cal.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Morgan
2026-02-04 13:08:28 +02:00
committed by GitHub
co-authored by morgan@cal.com <morgan@cal.com> morgan@cal.com <morgan@cal.com> morgan@cal.com <morgan@cal.com> morgan@cal.com <morgan@cal.com> morgan@cal.com <morgan@cal.com> morgan@cal.com <morgan@cal.com> morgan@cal.com <morgan@cal.com> morgan@cal.com <morgan@cal.com> morgan@cal.com <morgan@cal.com> morgan@cal.com <morgan@cal.com> morgan@cal.com <morgan@cal.com> morgan@cal.com <morgan@cal.com> morgan@cal.com <morgan@cal.com> morgan@cal.com <morgan@cal.com> Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent a28ab042ad
commit af230f919b
5 changed files with 292 additions and 17 deletions
+5 -2
View File
@@ -2199,6 +2199,7 @@
"organization.manageBilling",
"organization.changeMemberRole",
"organization.impersonate",
"organization.passwordReset",
"organization.update",
"booking.read",
"booking.readOrgBookings",
@@ -27480,6 +27481,7 @@
"organization.manageBilling",
"organization.changeMemberRole",
"organization.impersonate",
"organization.passwordReset",
"organization.update",
"booking.read",
"booking.readOrgBookings",
@@ -27587,6 +27589,7 @@
"organization.manageBilling",
"organization.changeMemberRole",
"organization.impersonate",
"organization.passwordReset",
"organization.update",
"booking.read",
"booking.readOrgBookings",
@@ -27722,6 +27725,7 @@
"organization.manageBilling",
"organization.changeMemberRole",
"organization.impersonate",
"organization.passwordReset",
"organization.update",
"booking.read",
"booking.readOrgBookings",
@@ -27828,6 +27832,7 @@
"organization.manageBilling",
"organization.changeMemberRole",
"organization.impersonate",
"organization.passwordReset",
"organization.update",
"booking.read",
"booking.readOrgBookings",
@@ -31195,8 +31200,6 @@
}
],
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"$ref": "#/components/schemas/Guest"
}