Merge pull request '[core-be-agent] fix(plugins/test): skip TestLocalResolver_BubblesUpCopyFailure when running as root' (#183) from fix/test-local-resolver-root-skip into main
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 4s
All checks were successful
Secret scan / Scan diff for credential-shaped strings (push) Successful in 4s
This commit is contained in:
commit
afdb546026
@ -133,7 +133,13 @@ func TestLocalResolver_HonoursContextCancellation(t *testing.T) {
|
||||
|
||||
func TestLocalResolver_BubblesUpCopyFailure(t *testing.T) {
|
||||
// Source file the copyTree walk would read; make dst unwritable so
|
||||
// the copyFile step fails.
|
||||
// the copyFile step fails. Skip when running as root — Linux
|
||||
// filesystem permissions are advisory-only for uid 0, so chmod 0o555
|
||||
// does not prevent writes and the test passes vacuously instead of
|
||||
// exercising the error path (issue #87).
|
||||
if os.Getuid() == 0 {
|
||||
t.Skip("skipping: chmod 0o555 is ineffective when running as root")
|
||||
}
|
||||
base := t.TempDir()
|
||||
writePlugin(t, base, "demo", map[string]string{
|
||||
"plugin.yaml": "name: demo\n",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user