[bug] [test-infra] TestLocalResolver_BubblesUpCopyFailure POSIX-mode assertion silently passes when test runs as root #87
Loading…
Reference in New Issue
Block a user
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?
Summary
internal/plugins/TestLocalResolver_BubblesUpCopyFailureasserts that the resolver's copy operation surfaces a permission error when the destination directory is read-only. The test fails when the test process has sufficient privileges to write through thechmod 0500(e.g., running as root, or on a filesystem that ignores POSIX modes).Repro
Output:
Reproduced on:
5.78.80.188(running as root)mainbranchmigrate/issue-71-vanity-importsbranchSuspected mechanism
POSIX modes are advisory for the superuser. Any test runner that's root will skip the permission check.
Fix shape
/dev/full(always-fails-write filesystem on Linux), or a fakeio.Writerthat returns an error on Write.os.Geteuid() == 0witht.Skip(...). Honest but reduces coverage on root-owned CI runners.Recommend (1).
Class
Pre-existing test-infra brittleness. Same class as
controlplane#31(systemd-analyze depending on cloudflared binary on host). Filed during the post-internal#71 test sweep. NOT a regression.Out of scope
internal#71 (Go module path migration) does not touch this code.
Reporter
Discovered during full-suite testing of the molecule-core vanity-import migration on operator host. 2026-05-07.