Skip to content

Commit 2881e6a

Browse files
test(desktop): cover WSL hashes through runtime resolution
1 parent ab67795 commit 2881e6a

2 files changed

Lines changed: 1 addition & 9 deletions

File tree

‎apps/desktop/src/backend/DesktopBackendConfiguration.test.ts‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,6 @@ const withPackagedWslHarness = <A, E, R>(
218218
}).pipe(Effect.scoped, Effect.provide(NodeServices.layer));
219219

220220
describe("DesktopBackendConfiguration", () => {
221-
it("accepts only normalized SHA-256 archive identities", () => {
222-
assert.equal(
223-
DesktopBackendConfiguration.parseWslRuntimeArchiveHash(` ${"A".repeat(64)}\n`),
224-
"a".repeat(64),
225-
);
226-
assert.isNull(DesktopBackendConfiguration.parseWslRuntimeArchiveHash("abc123"));
227-
});
228-
229221
it.effect("resolvePrimary produces a stable scoped bootstrap token", () =>
230222
withHarness(
231223
Effect.gen(function* () {

‎apps/desktop/src/backend/DesktopBackendConfiguration.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ const WSL_RUNTIME_ARCHIVE_NAME = "wsl-runtime.tar.gz";
243243
const WSL_RUNTIME_ARCHIVE_HASH_NAME = `${WSL_RUNTIME_ARCHIVE_NAME}.sha256`;
244244
const SHA256_HEX_PATTERN = /^[0-9a-f]{64}$/i;
245245

246-
export const parseWslRuntimeArchiveHash = (value: string): string | null => {
246+
const parseWslRuntimeArchiveHash = (value: string): string | null => {
247247
const trimmed = value.trim();
248248
return SHA256_HEX_PATTERN.test(trimmed) ? trimmed.toLowerCase() : null;
249249
};

0 commit comments

Comments
 (0)