Page MenuHomeDevCentral

Detect when test suite runs with privileged access
ClosedPublic

Authored by dereckson on Mar 11 2020, 14:42.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 18, 03:30
Unknown Object (File)
Mon, Nov 17, 14:02
Unknown Object (File)
Fri, Nov 14, 07:40
Unknown Object (File)
Fri, Nov 14, 05:58
Unknown Object (File)
Tue, Nov 11, 22:11
Unknown Object (File)
Tue, Nov 11, 20:02
Unknown Object (File)
Mon, Nov 10, 22:03
Unknown Object (File)
Mon, Nov 10, 12:44
Subscribers
None

Details

Summary

When the test suite runs as root under Linux or FreeBSD,
or with elevated status ('runs as administrator') on Windows,
the process can see normally non-readable files.

As such, we skip the relevant tests.

Test Plan
  • Windows: runs in a regular console and a privileged console
  • Debian: runs as root, and with sudo -u nobody phpunit
  • FreeBSD: runs trim(shell_exec('id -u')) with psysh

Diff Detail

Repository
rKOT Keruald OmniTools
Lint
Lint Not Applicable
Unit
Tests Not Applicable