test: trim system run runtime duplicate · openclaw/openclaw@cbc88fb
steipete
·
2026-04-24
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -959,32 +959,6 @@ describe("handleSystemRunInvoke mac app exec host routing", () => {
|
959 | 959 | message: "SYSTEM_RUN_DENIED: approval script operand changed before execution", |
960 | 960 | exact: true, |
961 | 961 | }); |
962 | | -const stableTmp = createFixtureDir("openclaw-approval-tsx-script-stable-"); |
963 | | -const stableFixture = createRuntimeScriptOperandFixture({ tmp: stableTmp, runtime: "tsx" }); |
964 | | -fs.writeFileSync(stableFixture.scriptPath, stableFixture.initialBody); |
965 | | -const stablePrepared = buildSystemRunApprovalPlan({ |
966 | | -command: stableFixture.command, |
967 | | -cwd: stableTmp, |
968 | | -}); |
969 | | -expect(stablePrepared.ok).toBe(true); |
970 | | -if (!stablePrepared.ok) { |
971 | | -throw new Error("unreachable"); |
972 | | -} |
973 | | - |
974 | | -const stableRun = await runSystemInvoke({ |
975 | | -preferMacAppExecHost: false, |
976 | | -command: stablePrepared.plan.argv, |
977 | | -rawCommand: stablePrepared.plan.commandText, |
978 | | -systemRunPlan: stablePrepared.plan, |
979 | | -cwd: stablePrepared.plan.cwd ?? stableTmp, |
980 | | -approved: true, |
981 | | -security: "full", |
982 | | -ask: "off", |
983 | | -}); |
984 | | - |
985 | | -expect(stableRun.runCommand).toHaveBeenCalledTimes(1); |
986 | | -expectInvokeOk(stableRun.sendInvokeResult); |
987 | | - |
988 | 962 | const missingBindingTmp = createFixtureDir("openclaw-approval-tsx-missing-binding-"); |
989 | 963 | const missingBindingFixture = createRuntimeScriptOperandFixture({ |
990 | 964 | tmp: missingBindingTmp, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。