fix(package): accept uppercase artifact digests · openclaw/openclaw@b3968f6
vincentkoc
·
2026-06-21
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -8,6 +8,7 @@ import { pathToFileURL } from "node:url";
|
8 | 8 | import { afterEach, describe, expect, it } from "vitest"; |
9 | 9 | import { |
10 | 10 | ARTIFACT_TARBALL_SCAN_MAX_ENTRIES, |
| 11 | +assertExpectedSha256ForTest, |
11 | 12 | cleanupPackageSourceWorktreeForTest, |
12 | 13 | cleanPackedOpenClawTarballsForTest, |
13 | 14 | downloadUrl, |
@@ -1020,6 +1021,16 @@ describe("resolve-openclaw-package-candidate", () => {
|
1020 | 1021 | }); |
1021 | 1022 | }); |
1022 | 1023 | |
| 1024 | +it("accepts uppercase package artifact SHA-256 metadata", async () => { |
| 1025 | +const dir = await mkdtemp(path.join(tmpdir(), "openclaw-package-sha-")); |
| 1026 | +tempDirs.push(dir); |
| 1027 | +const file = path.join(dir, "openclaw.tgz"); |
| 1028 | +await writeFile(file, "openclaw package bytes"); |
| 1029 | +const digest = "ae0b98d18c80dbf9447fa48560a139195595db2d337ad33421ca2183b0dd3e99"; |
| 1030 | + |
| 1031 | +await expect(assertExpectedSha256ForTest(file, digest.toUpperCase())).resolves.toBe(digest); |
| 1032 | +}); |
| 1033 | + |
1023 | 1034 | it("rejects source artifact scans that exceed the filesystem entry limit", async () => { |
1024 | 1035 | const dir = await mkdtemp(path.join(tmpdir(), "openclaw-package-artifact-scan-")); |
1025 | 1036 | tempDirs.push(dir); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。