refactor: v2 api e2e performance (#19028)

* refactor: use unique names in e2e tests

* refactor: version number in tests

* refactor: use unique names in e2e tests

* refactor: use unique names in e2e tests

* refactor: test cleanup

* refactor: increase e2e maxWorkers to 8

* refactor: randomNumber -> randomString

* chore: add local e2e command
This commit is contained in:
Lauris Skraucis
2025-02-03 11:40:37 +01:00
committed by GitHub
parent 4fd5b3133d
commit 1043085741
49 changed files with 649 additions and 559 deletions
@@ -15,13 +15,14 @@ import { Test } from "@nestjs/testing";
import * as request from "supertest";
import { UserRepositoryFixture } from "test/fixtures/repository/users.repository.fixture";
import { WebhookRepositoryFixture } from "test/fixtures/repository/webhooks.repository.fixture";
import { randomString } from "test/utils/randomString";
import { withApiAuth } from "test/utils/withApiAuth";
import { Webhook } from "@calcom/prisma/client";
describe("WebhooksController (e2e)", () => {
let app: INestApplication;
const userEmail = "webhook-controller-e2e@api.com";
const userEmail = `webhooks-controller-user-${randomString()}@api.com`;
let user: UserWithProfile;
let otherUser: UserWithProfile;
@@ -47,8 +48,8 @@ describe("WebhooksController (e2e)", () => {
});
otherUser = await userRepositoryFixture.create({
email: "other-user-webhook-controller@api.com",
username: "other-user-webhook-controller@api.com",
email: `webhooks-controller-other-user-${randomString()}@api.com`,
username: `webhooks-controller-other-user-${randomString()}@api.com`,
});
otherWebhook = await webhookRepositoryFixture.create({