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
This commit is contained in:
czlonkowski
2025-10-04 10:18:16 +02:00
parent 9b94e3be9c
commit 2f18a2bb9a

View File

@@ -36,8 +36,11 @@ describe('Integration: handleCreateWorkflow', () => {
// Global cleanup after all tests to catch any orphaned workflows // Global cleanup after all tests to catch any orphaned workflows
// (e.g., from test retries or failures) // (e.g., from test retries or failures)
// IMPORTANT: Skip cleanup in CI to preserve shared n8n instance workflows
afterAll(async () => { afterAll(async () => {
if (!process.env.CI) {
await cleanupOrphanedWorkflows(); await cleanupOrphanedWorkflows();
}
}); });
// ====================================================================== // ======================================================================