mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 15:08:25 +00:00
refactor(test): share gateway e2e registry helper
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user