refactor(test): share gateway e2e registry helper

This commit is contained in:
Peter Steinberger
2026-02-15 21:41:18 +00:00
parent 84601bf96b
commit c3812a1ffb
5 changed files with 21 additions and 55 deletions

View File

@@ -12,6 +12,7 @@ import { GatewayLockError } from "../infra/gateway-lock.js";
import { getActivePluginRegistry, setActivePluginRegistry } from "../plugins/runtime.js";
import { createOutboundTestPlugin } from "../test-utils/channel-plugins.js";
import { GATEWAY_CLIENT_MODES, GATEWAY_CLIENT_NAMES } from "../utils/message-channel.js";
import { createRegistry } from "./server.e2e-registry-helpers.js";
import {
connectOk,
getFreePort,
@@ -67,19 +68,6 @@ const whatsappPlugin = createOutboundTestPlugin({
label: "WhatsApp",
});
const createRegistry = (channels: PluginRegistry["channels"]): PluginRegistry => ({
plugins: [],
tools: [],
channels,
providers: [],
gatewayHandlers: {},
httpHandlers: [],
httpRoutes: [],
cliRegistrars: [],
services: [],
diagnostics: [],
});
const whatsappRegistry = createRegistry([
{
pluginId: "whatsapp",