Skip to content

Commit d3943d9

Browse files
committed
test(execution): remove run snapshots in the new integration fixtures
1 parent 5a1790c commit d3943d9

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎apps/sim/background/deployed-run-variables.integration.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
workflow,
1313
workflowDeploymentVersion,
1414
workflowExecutionLogs,
15+
workflowExecutionSnapshots,
1516
workflowSchedule,
1617
workspace,
1718
} from '@sim/db/schema'
@@ -246,6 +247,9 @@ afterAll(async () => {
246247
await db
247248
.delete(workflowExecutionLogs)
248249
.where(inArray(workflowExecutionLogs.workflowId, workflowIds))
250+
await db
251+
.delete(workflowExecutionSnapshots)
252+
.where(inArray(workflowExecutionSnapshots.workflowId, workflowIds))
249253
}
250254
await deleteWorkspaceFixture(db, eq(workspace.id, workspaceId))
251255
await db.delete(user).where(eq(user.id, ownerId))

‎apps/sim/lib/workflows/application/execute-workflow-version.integration.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
workflow,
1212
workflowDeploymentVersion,
1313
workflowExecutionLogs,
14+
workflowExecutionSnapshots,
1415
workspace,
1516
} from '@sim/db/schema'
1617
import { deleteWorkspaceFixture, insertWorkspaceFixture } from '@sim/db/testing/workspace-fixtures'
@@ -168,6 +169,9 @@ beforeAll(async () => {
168169

169170
afterAll(async () => {
170171
await db.delete(workflowExecutionLogs).where(eq(workflowExecutionLogs.workflowId, workflowId))
172+
await db
173+
.delete(workflowExecutionSnapshots)
174+
.where(eq(workflowExecutionSnapshots.workflowId, workflowId))
171175
if (jobIds.length > 0) await db.delete(asyncJobs).where(inArray(asyncJobs.id, jobIds))
172176
await deleteWorkspaceFixture(db, eq(workspace.id, workspaceId))
173177
await db.delete(user).where(eq(user.id, ownerId))

‎apps/sim/lib/workflows/application/read-workflow-run-pause.integration.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
workflow,
1818
workflowDeploymentVersion,
1919
workflowExecutionLogs,
20+
workflowExecutionSnapshots,
2021
workspace,
2122
workspaceEnvironment,
2223
} from '@sim/db/schema'
@@ -232,6 +233,9 @@ beforeAll(async () => {
232233
afterAll(async () => {
233234
await db.delete(pausedExecutions).where(eq(pausedExecutions.workflowId, workflowId))
234235
await db.delete(workflowExecutionLogs).where(eq(workflowExecutionLogs.workflowId, workflowId))
236+
await db
237+
.delete(workflowExecutionSnapshots)
238+
.where(eq(workflowExecutionSnapshots.workflowId, workflowId))
235239
await deleteWorkspaceFixture(db, eq(workspace.id, workspaceId))
236240
await db.delete(organization).where(eq(organization.id, organizationId))
237241
await db.delete(user).where(inArray(user.id, [ownerId, restrictedId]))

0 commit comments

Comments
 (0)