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)
Thu, Sep 18, 05:13
Unknown Object (File)
Wed, Sep 17, 14:52
Unknown Object (File)
Sun, Sep 14, 10:39
Unknown Object (File)
Sat, Sep 13, 21:30
Unknown Object (File)
Sat, Sep 13, 18:16
Unknown Object (File)
Tue, Sep 9, 16:44
Unknown Object (File)
Sun, Sep 7, 12:29
Unknown Object (File)
Tue, Sep 2, 19:01
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