mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Extract ActiveWebhooks out of ActiveWorkflowRunner (no-changelog) (#8171)
## Summary This PR continues refactoring webhooks code for better modularity. Continued from #8069 to bring back `ActiveWebhooks`, but this time actually handling active webhook calls in this class. ## Review / Merge checklist - [x] PR title and summary are descriptive
This commit is contained in:
committed by
GitHub
parent
68cff4c59e
commit
c84d3c3bbf
@@ -4,7 +4,7 @@ import { mock } from 'jest-mock-extended';
|
||||
|
||||
import config from '@/config';
|
||||
import { AbstractServer } from '@/AbstractServer';
|
||||
import { ActiveWorkflowRunner } from '@/ActiveWorkflowRunner';
|
||||
import { ActiveWebhooks } from '@/ActiveWebhooks';
|
||||
import { ExternalHooks } from '@/ExternalHooks';
|
||||
import { InternalHooks } from '@/InternalHooks';
|
||||
import { TestWebhooks } from '@/TestWebhooks';
|
||||
@@ -22,7 +22,7 @@ describe('WebhookServer', () => {
|
||||
|
||||
describe('CORS', () => {
|
||||
const corsOrigin = 'https://example.com';
|
||||
const activeWorkflowRunner = mockInstance(ActiveWorkflowRunner);
|
||||
const activeWebhooks = mockInstance(ActiveWebhooks);
|
||||
const testWebhooks = mockInstance(TestWebhooks);
|
||||
mockInstance(WaitingWebhooks);
|
||||
mockInstance(WaitingForms);
|
||||
@@ -36,7 +36,7 @@ describe('WebhookServer', () => {
|
||||
});
|
||||
|
||||
const tests = [
|
||||
['webhook', activeWorkflowRunner],
|
||||
['webhook', activeWebhooks],
|
||||
['webhookTest', testWebhooks],
|
||||
// TODO: enable webhookWaiting & waitingForms after CORS support is added
|
||||
// ['webhookWaiting', waitingWebhooks],
|
||||
|
||||
Reference in New Issue
Block a user