summaryrefslogtreecommitdiff
path: root/test/parallel/test-process-uid-gid.js
AgeCommit message (Collapse)Author
2019-06-20test: use .code for error in setgid=
When the 'nobody' user is missing use .code to detect this, its more robust than than the .message string. Refs: https://github.com/nodejs/node/issues/19594 PR-URL: https://github.com/nodejs/node/pull/28219 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-02-05process: stub unsupported worker methodscjihrig
Some process methods are not supported in workers. This commit adds stubs that throw more informative errors. PR-URL: https://github.com/nodejs/node/pull/25587 Fixes: https://github.com/nodejs/node/issues/25448 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-06test,tools: enable running tests under workersAnna Henningsen
Enable running tests inside workers by passing `--worker` to `tools/test.py`. A number of tests are marked as skipped, or have been slightly altered to fit the different environment. PR-URL: https://github.com/nodejs/node/pull/20876 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2018-04-26process: migrate methods to throw errors with codeMichaël Zasso
Migrate some methods from node.cc to JS in order to properly throw errors with codes. PR-URL: https://github.com/nodejs/node/pull/19973 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-21test: resolve process.setgid() error on UbuntuDivyanshu Singh
When the tests are run as root in Ubuntu, process.setgid() is called with 'nobody' as an argument. This throws an error in Ubuntu and is because, in Ubuntu, the equivalent of 'nobody' group is named as 'nogroup'. This commit sets gid to 'nobody' first and if it throws a "group id does not exist" error, it attempts to set gid to 'nogroup'. If it still causes an error, the error is thrown. PR-URL: https://github.com/nodejs/node/pull/19755 Refs: https://github.com/nodejs/node/issues/19594 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-04-07test: rename test casesRajkumar Purushothaman
test-process-geteuid-getegid.js is renamed to test-process-euid-egid.js. test-process-setuid-setgid.js is renamed to test-process-uid-gid.js. PR-URL: https://github.com/nodejs/node/pull/19765 Fixes: https://github.com/nodejs/node/issues/19592 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>