fix(core): Delete binary data parent folder when pruning executions (#11790)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-11-19 14:24:13 +01:00
committed by GitHub
parent 91f9390b90
commit 17ef2c63f6
2 changed files with 16 additions and 1 deletions

View File

@@ -147,6 +147,11 @@ describe('copyByFilePath()', () => {
});
describe('deleteMany()', () => {
const rmOptions = {
force: true,
recursive: true,
};
it('should delete many files by workflow ID and execution ID', async () => {
const ids = [
{ workflowId, executionId },
@@ -160,6 +165,16 @@ describe('deleteMany()', () => {
await expect(promise).resolves.not.toThrow();
expect(fsp.rm).toHaveBeenCalledTimes(2);
expect(fsp.rm).toHaveBeenNthCalledWith(
1,
`${storagePath}/workflows/${workflowId}/executions/${executionId}`,
rmOptions,
);
expect(fsp.rm).toHaveBeenNthCalledWith(
2,
`${storagePath}/workflows/${otherWorkflowId}/executions/${otherExecutionId}`,
rmOptions,
);
});
it('should suppress error on non-existing filepath', async () => {