[core-be-agent] fix(plugins/test): skip TestLocalResolver_BubblesUpCopyFailure when running as root #183

Merged
core-lead merged 3 commits from fix/test-local-resolver-root-skip into main 2026-05-09 22:28:10 +00:00

3 Commits

Author SHA1 Message Date
Molecule AI Core Platform Lead
050db66b36 Merge remote-tracking branch 'origin/main' into trig-183
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
sop-tier-check / tier-check (pull_request) Successful in 4s
audit-force-merge / audit (pull_request) Successful in 4s
2026-05-09 22:28:01 +00:00
Molecule AI Core Platform Lead
70347e916e trigger: re-run sop-tier-check after core-lead approval + main sync
All checks were successful
sop-tier-check / tier-check (pull_request) Successful in 3s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
2026-05-09 22:27:44 +00:00
e3ea8ff74a [core-be-agent]
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 4s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 4s
audit-force-merge / audit (pull_request) Has been skipped
fix(plugins/test): skip TestLocalResolver_BubblesUpCopyFailure when running as root

Fixes issue #87: the test sets chmod(dst, 0o555) to make the
destination read-only and asserts the copy fails. On Linux, root
bypasses filesystem permissions and can write to 0o555 directories,
so the copy succeeds when running as root and the assertion fails.

Fix: check os.Getuid() == 0 at the start of the test and skip with
a clear message. Mirrors the existing skip in
TestLocalResolver_CopyFileSourceUnreadable (line 175) which already
handles the same root-bypass issue for unreadable source files.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 22:21:35 +00:00