test: clear openshell broad matchers · openclaw/openclaw@5a3fc79
shakkernerd
·
2026-05-10
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -137,13 +137,15 @@ describe("openshell backend manager", () => {
|
137 | 137 | actualConfigLabel: "custom-source", |
138 | 138 | configLabelMatch: true, |
139 | 139 | }); |
| 140 | +const expectedConfig = resolveOpenShellPluginConfig({ |
| 141 | +command: "openshell", |
| 142 | +from: "custom-source", |
| 143 | +}); |
140 | 144 | expect(cliMocks.runOpenShellCli).toHaveBeenCalledWith({ |
141 | | -context: expect.objectContaining({ |
| 145 | +context: { |
142 | 146 | sandboxName: "openclaw-session-1234", |
143 | | -config: expect.objectContaining({ |
144 | | -from: "custom-source", |
145 | | -}), |
146 | | -}), |
| 147 | +config: expectedConfig, |
| 148 | +}, |
147 | 149 | args: ["sandbox", "get", "openclaw-session-1234"], |
148 | 150 | }); |
149 | 151 | }); |
@@ -176,14 +178,15 @@ describe("openshell backend manager", () => {
|
176 | 178 | config: {}, |
177 | 179 | }); |
178 | 180 | |
| 181 | +const expectedConfig = resolveOpenShellPluginConfig({ |
| 182 | +command: "/usr/local/bin/openshell", |
| 183 | +gateway: "lab", |
| 184 | +}); |
179 | 185 | expect(cliMocks.runOpenShellCli).toHaveBeenCalledWith({ |
180 | | -context: expect.objectContaining({ |
| 186 | +context: { |
181 | 187 | sandboxName: "openclaw-session-5678", |
182 | | -config: expect.objectContaining({ |
183 | | -command: "/usr/local/bin/openshell", |
184 | | -gateway: "lab", |
185 | | -}), |
186 | | -}), |
| 188 | +config: expectedConfig, |
| 189 | +}, |
187 | 190 | args: ["sandbox", "delete", "openclaw-session-5678"], |
188 | 191 | }); |
189 | 192 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。