Skip to content

Commit 133377a

Browse files
committed
test(e2e): reject invalid cache before reads
1 parent 518be04 commit 133377a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

test/e2e/support/e2e-unit-test-gaps.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,10 +422,15 @@ describe("weekly E2E unit-test gap analysis", () => {
422422
{ mode: 0o600 },
423423
);
424424
fs.symlinkSync(target, path.join(cacheDir, "56789014-attempt-1.json"));
425+
let reads = 0;
425426

426427
await expect(
427-
collectEvidence([failedRun(56789014)], cacheDir, async () => ""),
428+
collectEvidence([failedRun(56789014)], cacheDir, async () => {
429+
reads += 1;
430+
return "";
431+
}),
428432
).rejects.toThrow("Cached evidence for run 56789014 is not a bounded regular file.");
433+
expect(reads).toBe(0);
429434
});
430435
});
431436

0 commit comments

Comments
 (0)