mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
docs: More detail on running tests as different users
Add some more detail to the unit test advice document about running tests as different users. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
fcf45b0c92
commit
baf4f76d97
@ -268,12 +268,9 @@ mod tests {
|
||||
|
||||
When writing a test consider which user should run it; even if the code the
|
||||
test is exercising runs as `root`, it may be necessary to *only* run the test
|
||||
as a non-`root` for the test to be meaningful.
|
||||
|
||||
Some repositories already provide utility functions to skip a test:
|
||||
|
||||
- if running as `root`
|
||||
- if not running as `root`
|
||||
as a non-`root` for the test to be meaningful. Add appropriate skip
|
||||
guards around code that requires `root` and non-`root` so that the test
|
||||
will run if the correct type of user is detected and skipped if not.
|
||||
|
||||
### Run Golang tests as a different user
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user