test(openshell): accept native symlink targets · openclaw/openclaw@2fe2dbd
vincentkoc
·
2026-05-05
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -152,12 +152,13 @@ describe("replaceDirectoryContents", () => {
|
152 | 152 | |
153 | 153 | await fs.writeFile(path.join(source, "safe.txt"), "ok"); |
154 | 154 | await fs.writeFile(path.join(source, "linked-entry"), "remote-plain-file"); |
155 | | -await fs.symlink("/tmp/trusted-host-target", path.join(target, "linked-entry")); |
| 155 | +const trustedTarget = path.resolve("/tmp/trusted-host-target"); |
| 156 | +await fs.symlink(trustedTarget, path.join(target, "linked-entry")); |
156 | 157 | |
157 | 158 | await replaceDirectoryContents({ sourceDir: source, targetDir: target }); |
158 | 159 | |
159 | 160 | expect(await fs.readFile(path.join(target, "safe.txt"), "utf8")).toBe("ok"); |
160 | | -expect(await fs.readlink(path.join(target, "linked-entry"))).toBe("/tmp/trusted-host-target"); |
| 161 | +expect(await fs.readlink(path.join(target, "linked-entry"))).toBe(trustedTarget); |
161 | 162 | }); |
162 | 163 | }); |
163 | 164 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。