docker: four tests fail on Windows — path separators, not logic #20
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Split out of #12 so it can be fixed on a Windows checkout by someone who has one. Found by @julian's fifth review pass on #10; the description below is his.
deno task teston a Windows checkout is 299 passed / 4 failed:commit_test.tsgit probescompose_update_test.ts— "eligibility: a legal../path is accepted once it resolves inside /"Path shape, not logic:
rootOfreturnsC:/Users/…while the file paths carry\, sofile.startsWith(root + "/")misses. Thediff --githeader then keeps an absolute path andgit apply --cachedrejects it.makeTempDir()returnsC:\…, which failsstartsWith("/").They run rather than skip because git is present, so they are red rather than ignored.
Two ways to fix, and the choice is worth making deliberately:
Deno.build.os === "windows"alongside the existingignore: !hasGit. Cheap, honest about the coverage, leaves the underlying path handling untested on Windows.rootOf/hostPathactually work on a Windows path. If the product is ever expected to run from a Windows checkout, this is the one that answers a real question.The tests were added in #10, and the "251 local / 245 + 4 ignored" figure in that PR only ever held because every run was POSIX — so the number was reported honestly and was still wrong for the machine review happens on.
Not blocking anything: the failures are in tests, and the code they cover is exercised on Linux, which is where the product runs.
/cc @julian — this one is yours if you want it; the Windows box is the part I do not have.