Commit Graph

4 Commits

Author SHA1 Message Date
cjihrig
b9abeeccc0 test: allow testing uid and gid separately
This commit lets the uid and gid options of spawn() to be
tested independently of one another based on the user's uid
and gid.

Fixes: https://github.com/nodejs/node/issues/10646
PR-URL: https://github.com/nodejs/node/pull/10647
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-01-09 12:31:52 -05:00
Michaël Zasso
1554735dec test: fix child-process-uid-gid on Windows
The process.getuid method does not exist on this platform.

Ref: https://github.com/nodejs/node/pull/8864
PR-URL: https://github.com/nodejs/node/pull/8924
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-10-04 16:04:05 -07:00
Wyatt Preul
8dc2b422a9 test: fix running child-process-uid-gid as root
This skips the child-test-uid-gid test when run as root.
Previously, the test failed if executed as root.

PR-URL: https://github.com/nodejs/node/pull/8864
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
2016-10-03 09:21:53 -05:00
Rich Trott
d0151695a7 test: add test for uid/gid setting in spawn
Remove a disabled test in favor of one that expects an error.

This validates (somewhat) that the underlying code is calling the
correct system call for setting UID and GID. Unlike the formerly
disabled test, it does not try to validate that the system UID/GID
setting works.

PR-URL: https://github.com/nodejs/node/pull/7084
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-06-03 13:42:24 -07:00