Skip to content

Commit

Permalink
test: test process.setuid for bad argument types
Browse files Browse the repository at this point in the history
Test process.setuid with an object as an argument. An equivalent test
exists for process.seteuid.

PR-URL: #19703
Fixes: #19591
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
dsinecos authored and targos committed Apr 4, 2018
1 parent 041f6cd commit 92e9ed0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/parallel/test-process-setuid-setgid.js
Expand Up @@ -33,6 +33,10 @@ if (common.isWindows) {
return;
}

assert.throws(() => {
process.setuid({});
}, /^TypeError: setuid argument must be a number or a string$/);

assert.throws(() => {
process.setuid('fhqwhgadshgnsdhjsdbkhsdabkfabkveybvf');
}, /^Error: setuid user id does not exist$/);
Expand Down

0 comments on commit 92e9ed0

Please sign in to comment.