mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 11:24:47 +00:00
test: clear openshell broad matchers
This commit is contained in:
@@ -46,12 +46,20 @@ describe("openshell plugin config", () => {
|
||||
remoteWorkspaceDir: "/sandbox/../sandbox/project",
|
||||
remoteAgentWorkspaceDir: "/agent/./session",
|
||||
}),
|
||||
).toEqual(
|
||||
expect.objectContaining({
|
||||
remoteWorkspaceDir: "/sandbox/project",
|
||||
remoteAgentWorkspaceDir: "/agent/session",
|
||||
}),
|
||||
);
|
||||
).toEqual({
|
||||
mode: "mirror",
|
||||
command: "openshell",
|
||||
gateway: undefined,
|
||||
gatewayEndpoint: undefined,
|
||||
from: "openclaw",
|
||||
policy: undefined,
|
||||
providers: [],
|
||||
gpu: false,
|
||||
autoProviders: true,
|
||||
remoteWorkspaceDir: "/sandbox/project",
|
||||
remoteAgentWorkspaceDir: "/agent/session",
|
||||
timeoutMs: 120_000,
|
||||
});
|
||||
});
|
||||
|
||||
it("rejects unknown mode", () => {
|
||||
|
||||
@@ -137,13 +137,15 @@ describe("openshell backend manager", () => {
|
||||
actualConfigLabel: "custom-source",
|
||||
configLabelMatch: true,
|
||||
});
|
||||
const expectedConfig = resolveOpenShellPluginConfig({
|
||||
command: "openshell",
|
||||
from: "custom-source",
|
||||
});
|
||||
expect(cliMocks.runOpenShellCli).toHaveBeenCalledWith({
|
||||
context: expect.objectContaining({
|
||||
context: {
|
||||
sandboxName: "openclaw-session-1234",
|
||||
config: expect.objectContaining({
|
||||
from: "custom-source",
|
||||
}),
|
||||
}),
|
||||
config: expectedConfig,
|
||||
},
|
||||
args: ["sandbox", "get", "openclaw-session-1234"],
|
||||
});
|
||||
});
|
||||
@@ -176,14 +178,15 @@ describe("openshell backend manager", () => {
|
||||
config: {},
|
||||
});
|
||||
|
||||
const expectedConfig = resolveOpenShellPluginConfig({
|
||||
command: "/usr/local/bin/openshell",
|
||||
gateway: "lab",
|
||||
});
|
||||
expect(cliMocks.runOpenShellCli).toHaveBeenCalledWith({
|
||||
context: expect.objectContaining({
|
||||
context: {
|
||||
sandboxName: "openclaw-session-5678",
|
||||
config: expect.objectContaining({
|
||||
command: "/usr/local/bin/openshell",
|
||||
gateway: "lab",
|
||||
}),
|
||||
}),
|
||||
config: expectedConfig,
|
||||
},
|
||||
args: ["sandbox", "delete", "openclaw-session-5678"],
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user