mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(core): Revert transactions until we remove the legacy sqlite driver (#10299)
This commit is contained in:
committed by
GitHub
parent
74e154b130
commit
1eba7c3c76
@@ -52,34 +52,5 @@ describe('ExecutionRepository', () => {
|
||||
});
|
||||
expect(executionData?.data).toEqual('[{"resultData":"1"},{}]');
|
||||
});
|
||||
|
||||
it('should not create execution if execution data insert fails', async () => {
|
||||
const executionRepo = Container.get(ExecutionRepository);
|
||||
const executionDataRepo = Container.get(ExecutionDataRepository);
|
||||
|
||||
const workflow = await createWorkflow({ settings: { executionOrder: 'v1' } });
|
||||
jest
|
||||
.spyOn(executionDataRepo, 'createExecutionDataForExecution')
|
||||
.mockRejectedValueOnce(new Error());
|
||||
|
||||
await expect(
|
||||
async () =>
|
||||
await executionRepo.createNewExecution({
|
||||
workflowId: workflow.id,
|
||||
data: {
|
||||
//@ts-expect-error This is not needed for tests
|
||||
resultData: {},
|
||||
},
|
||||
workflowData: workflow,
|
||||
mode: 'manual',
|
||||
startedAt: new Date(),
|
||||
status: 'new',
|
||||
finished: false,
|
||||
}),
|
||||
).rejects.toThrow();
|
||||
|
||||
const executionEntities = await executionRepo.find();
|
||||
expect(executionEntities).toBeEmptyArray();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user