From 2f18a2bb9ad839b8c89c6bea8dc039c268ddc811 Mon Sep 17 00:00:00 2001 From: czlonkowski <56956555+czlonkowski@users.noreply.github.com> Date: Sat, 4 Oct 2025 10:18:16 +0200 Subject: [PATCH] fix(tests): disable workflow cleanup in CI to preserve shared n8n instance The cleanup was deleting ALL test workflows in CI, including the pre-activated webhook workflow that needs to persist across test runs. Since CI uses a shared n8n instance (not a disposable test instance), we should skip cleanup there. Cleanup now only runs locally where users can recreate their own test workflows. Critical fix: Prevents accidental deletion of the webhook workflow in CI --- tests/integration/n8n-api/workflows/create-workflow.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/integration/n8n-api/workflows/create-workflow.test.ts b/tests/integration/n8n-api/workflows/create-workflow.test.ts index 69157fb..215431e 100644 --- a/tests/integration/n8n-api/workflows/create-workflow.test.ts +++ b/tests/integration/n8n-api/workflows/create-workflow.test.ts @@ -36,8 +36,11 @@ describe('Integration: handleCreateWorkflow', () => { // Global cleanup after all tests to catch any orphaned workflows // (e.g., from test retries or failures) + // IMPORTANT: Skip cleanup in CI to preserve shared n8n instance workflows afterAll(async () => { - await cleanupOrphanedWorkflows(); + if (!process.env.CI) { + await cleanupOrphanedWorkflows(); + } }); // ======================================================================