mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 14:30:45 +00:00
test: trim browser bootstrap integration
This commit is contained in:
@@ -5,8 +5,6 @@ import { clearPluginDiscoveryCache } from "../plugins/discovery.js";
|
||||
import { clearPluginLoaderCache } from "../plugins/loader.js";
|
||||
import { clearPluginManifestRegistryCache } from "../plugins/manifest-registry.js";
|
||||
import { resetPluginRuntimeStateForTest } from "../plugins/runtime.js";
|
||||
import { listGatewayMethods } from "./server-methods-list.js";
|
||||
import { coreGatewayHandlers } from "./server-methods.js";
|
||||
import { loadGatewayStartupPlugins } from "./server-plugin-bootstrap.js";
|
||||
|
||||
function resetPluginState() {
|
||||
@@ -50,8 +48,8 @@ describe("loadGatewayStartupPlugins browser plugin integration", () => {
|
||||
} as OpenClawConfig,
|
||||
workspaceDir: process.cwd(),
|
||||
log: createTestLog(),
|
||||
coreGatewayHandlers,
|
||||
baseMethods: listGatewayMethods(),
|
||||
coreGatewayHandlers: {},
|
||||
baseMethods: [],
|
||||
pluginIds: ["browser"],
|
||||
logDiagnostics: false,
|
||||
});
|
||||
@@ -63,30 +61,4 @@ describe("loadGatewayStartupPlugins browser plugin integration", () => {
|
||||
),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it("omits browser gateway ownership when the bundled browser plugin is disabled", () => {
|
||||
const loaded = loadGatewayStartupPlugins({
|
||||
cfg: {
|
||||
plugins: {
|
||||
allow: ["browser"],
|
||||
entries: {
|
||||
browser: {
|
||||
enabled: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
} as OpenClawConfig,
|
||||
workspaceDir: process.cwd(),
|
||||
log: createTestLog(),
|
||||
coreGatewayHandlers,
|
||||
baseMethods: listGatewayMethods(),
|
||||
pluginIds: ["browser"],
|
||||
logDiagnostics: false,
|
||||
});
|
||||
|
||||
expect(loaded.gatewayMethods).not.toContain("browser.request");
|
||||
expect(loaded.pluginRegistry.services.some((entry) => entry.pluginId === "browser")).toBe(
|
||||
false,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user