test: test process.setuid for bad argument types
Test process.setuid with an object as an argument. An equivalent test exists for process.seteuid. PR-URL: https://github.com/nodejs/node/pull/19703 Fixes: https://github.com/nodejs/node/issues/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>
This commit is contained in:
parent
8271215118
commit
83444b7c66
@ -33,6 +33,10 @@ if (common.isWindows) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert.throws(() => {
|
||||||
|
process.setuid({});
|
||||||
|
}, /^TypeError: setuid argument must be a number or a string$/);
|
||||||
|
|
||||||
assert.throws(() => {
|
assert.throws(() => {
|
||||||
process.setuid('fhqwhgadshgnsdhjsdbkhsdabkfabkveybvf');
|
process.setuid('fhqwhgadshgnsdhjsdbkhsdabkfabkveybvf');
|
||||||
}, /^Error: setuid user id does not exist$/);
|
}, /^Error: setuid user id does not exist$/);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user