You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Keep the secrets_sync Tests Meaningful Under a Root Test Runner #4262
tests/test_secrets_sync.py fails almost case by case when the test runner is root. scripts/secrets_sync.py refuses to run as root, and nearly every case drives the tool through a real main() path that reaches that refusal before the fake op is called. A run under a root CI container or a root shell therefore reports a wall of failures that say nothing about the code.
The one case added for the dry-run account refusal patches os.geteuid, so it passes as root. The rest of the module has no such guard.
How to Reproduce
Run uv run --no-project --python 3.13 --with-requirements tests/requirements.txt python -m unittest discover -s tests -p 'test_secrets_sync.py' as root inside a disposable container that holds a copy of the tree. The cases that reach the root refusal fail.
Fix Direction
Follow the shape tests/test_bootstrap.py and tests/test_restore_secrets.py took in #4258. Either patch os.geteuid to a non-root id for the cases that test non-root behavior, or skip them under real root, and keep the root-refusal case running as root.
Activity
Keep the secrets_sync Tests Meaningful Under a Root Test Runner (#4281)