fix test flakes (#25240)

This commit is contained in:
Anik Dhabal Babu authored and GitHub committed 2025-11-19 09:57:10 +02:00
1 parent 6169b92e98
commit 5cda123a4c
3 files changed
+5 -4

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ runs:
with:
path: ${{ inputs.path }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ inputs.path }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}
- run: USE_POOL=true yarn db-seed
- run: yarn db-seed
if: steps.cache-db.outputs.cache-hit != 'true'
shell: bash
- name: Postgres Dump Backup
+3 -1
View File
@@ -16,13 +16,15 @@ export const isAdminGuard = async (req: NextApiRequest) => {
where: {
userId: userId,
accepted: true,
role: {
in: [MembershipRole.OWNER, MembershipRole.ADMIN],
},
team: {
isOrganization: true,
organizationSettings: {
isAdminAPIEnabled: true,
},
},
OR: [{ role: MembershipRole.OWNER }, { role: MembershipRole.ADMIN }],
},
select: {
team: {
+1 -2
View File
@@ -8,9 +8,8 @@ import { excludePendingPaymentsExtension } from "./extensions/exclude-pending-pa
import { PrismaClient, type Prisma } from "./generated/prisma/client";
const connectionString = process.env.DATABASE_URL || "";
const isIntegrationTest = process.env.INTEGRATION_TESTS === "true";
const pool =
!isIntegrationTest && (process.env.USE_POOL === "true" || process.env.USE_POOL === "1")
process.env.USE_POOL === "true" || process.env.USE_POOL === "1"
? new Pool({
connectionString: connectionString,
max: 5,