diff --git a/plugin-server/src/worker/ingestion/hooks.ts b/plugin-server/src/worker/ingestion/hooks.ts index 78ac02daa7fcc..2cc8279c88d52 100644 --- a/plugin-server/src/worker/ingestion/hooks.ts +++ b/plugin-server/src/worker/ingestion/hooks.ts @@ -266,13 +266,13 @@ export class HookCommander { postgres: PostgresRouter, teamManager: TeamManager, organizationManager: OrganizationManager, - fetchHostnameGuardTeams: Set, + fetchHostnameGuardTeams?: Set, statsd?: StatsD ) { this.postgres = postgres this.teamManager = teamManager this.organizationManager = organizationManager - this.fetchHostnameGuardTeams = fetchHostnameGuardTeams + this.fetchHostnameGuardTeams = fetchHostnameGuardTeams || new Set() if (process.env.SITE_URL) { this.siteUrl = process.env.SITE_URL } else { diff --git a/plugin-server/tests/main/ingestion-queues/each-batch.test.ts b/plugin-server/tests/main/ingestion-queues/each-batch.test.ts index f0b4273bdb216..55dcb1e2f3d23 100644 --- a/plugin-server/tests/main/ingestion-queues/each-batch.test.ts +++ b/plugin-server/tests/main/ingestion-queues/each-batch.test.ts @@ -202,8 +202,7 @@ describe('eachBatchX', () => { const hookCannon = new HookCommander( queue.pluginsServer.postgres, queue.pluginsServer.teamManager, - queue.pluginsServer.organizationManager, - new Set() + queue.pluginsServer.organizationManager ) const matchSpy = jest.spyOn(actionMatcher, 'match') // mock hasWebhooks to return true diff --git a/plugin-server/tests/worker/ingestion/event-pipeline/event-pipeline-integration.test.ts b/plugin-server/tests/worker/ingestion/event-pipeline/event-pipeline-integration.test.ts index 4b1a04a0ba4d9..ac456a076276a 100644 --- a/plugin-server/tests/worker/ingestion/event-pipeline/event-pipeline-integration.test.ts +++ b/plugin-server/tests/worker/ingestion/event-pipeline/event-pipeline-integration.test.ts @@ -45,7 +45,7 @@ describe('Event Pipeline integration test', () => { actionManager = new ActionManager(hub.db.postgres) await actionManager.prepare() actionMatcher = new ActionMatcher(hub.db.postgres, actionManager) - hookCannon = new HookCommander(hub.db.postgres, hub.teamManager, hub.organizationManager, new Set()) + hookCannon = new HookCommander(hub.db.postgres, hub.teamManager, hub.organizationManager) jest.spyOn(hub.db, 'fetchPerson') jest.spyOn(hub.db, 'createPerson')