Skip to content

test: keep the exit-hook specs off the real mount directory - #30

Merged
uhs-robert merged 1 commit into
mainfrom
test/unmount-spec-isolation
Sep 11, 2026
Merged

uhs-robert merged 1 commit into
mainfrom
test/unmount-spec-isolation

Conversation

@uhs-robert

Copy link
Copy Markdown
Owner

The two automatic unmount on exit specs call sshfs.setup(), which sweeps the configured mount base dir via MountPoint.cleanup_stale. They also stub vim.fn.executable as true for everything while leaving vim.system real, so an empty leftover directory in the developer's ~/mnt made the sweep spawn diskutil — absent on Linux — and the suite failed with ENOENT: no such file or directory.

Green on CI and on a clean ~/mnt, red otherwise. Reproduced with a single mkdir ~/mnt/stale_probe, which flips the suite from 192 passed to 190 passed / 2 failed.

Now points base_dir at a tempname and stubs vim.system.

setup() sweeps the configured base dir, so these specs unmounted whatever
sat in the developer's ~/mnt. With every tool stubbed as present that meant
spawning diskutil on Linux, and the suite passed or failed by machine.
@uhs-robert
uhs-robert merged commit 568a1a8 into main Sep 11, 2026
3 checks passed
@uhs-robert
uhs-robert deleted the test/unmount-spec-isolation branch September 11, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant