mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 01:29:56 +00:00
test(pr): stub host tools in canonical-wrapper trust tests
CI runners switched to an image without ripgrep, so the parked-canonical wrapper test failed at scripts/pr's required-command check (Missing required command(s): rg) before reaching the trust routing it covers. Stub rg and pnpm in the fixture bin like the other wrapper fixtures.
This commit is contained in:
parent
1470a9bb09
commit
129a64030a
1 changed files with 10 additions and 0 deletions
|
|
@ -2089,6 +2089,11 @@ exit 99
|
|||
mkdirSync(join(dir, "bin"));
|
||||
writeFileSync(join(dir, "bin/gh"), "#!/bin/sh\nexit 99\n");
|
||||
chmodSync(join(dir, "bin/gh"), 0o755);
|
||||
// These tests cover wrapper trust routing, not the host command inventory.
|
||||
for (const command of ["pnpm", "rg"]) {
|
||||
writeFileSync(join(dir, "bin", command), "#!/bin/sh\nexit 0\n");
|
||||
chmodSync(join(dir, "bin", command), 0o755);
|
||||
}
|
||||
const git = (cwd: string, args: string[]) =>
|
||||
spawnSync("git", args, { cwd, env, encoding: "utf8", stdio: "pipe" });
|
||||
expect(git(repo, ["init", "-b", "main"]).status).toBe(0);
|
||||
|
|
@ -2169,6 +2174,11 @@ exit 99
|
|||
mkdirSync(join(dir, "bin"));
|
||||
writeFileSync(join(dir, "bin/gh"), "#!/bin/sh\nexit 99\n");
|
||||
chmodSync(join(dir, "bin/gh"), 0o755);
|
||||
// These tests cover wrapper trust routing, not the host command inventory.
|
||||
for (const command of ["pnpm", "rg"]) {
|
||||
writeFileSync(join(dir, "bin", command), "#!/bin/sh\nexit 0\n");
|
||||
chmodSync(join(dir, "bin", command), 0o755);
|
||||
}
|
||||
const git = (cwd: string, args: string[]) =>
|
||||
spawnSync("git", args, { cwd, env, encoding: "utf8", stdio: "pipe" });
|
||||
expect(git(repo, ["init", "-b", "main"]).status).toBe(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue