InvokingTestsAnsible
<
https://fedoraproject.org/wiki/Changes/InvokingTestsAnsible> says:
The playbook and its test suite or test framework:
SHOULD drop privileges appropriately if the test suite should be run as
non-root.
I'm not clear how you do that. The test suite should not assume any
particular environment. So I can't easily switch to a known non-root user
account, because such account might not exist. Am I expected to switch to a
predefined locked account like 'nobody'? Or is there a different way to
drop privileges?
My envisioned use case: I want to run or develop a very simple test, e.g.
rpmlint. I want to run it locally on my system, because it's the easiest
hassle-free way. I know it's non-destructive and basically harmless, but
the test system mandates it's run as root (according to the spec). I feel
uneasy about running even a harmless test as root, so this test will try to
drop privileges immediately after start. But how exactly does it do that?
Thanks,
Kamil