Skip to content

Commit 2e2e93c

Browse files
author
=
committed
test: added Ubuntu error code support to test-process-uid-gid.js
This change adds coverage for the error code received when process.setgid('nobody') is called on Ubuntu, where the standard 'nobody' group from UNIX systems is named 'nogroup'. Refs: #19594
1 parent b614840 commit 2e2e93c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/parallel/test-process-uid-gid.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@ const oldgid = process.getgid();
7474
try {
7575
process.setgid('nobody');
7676
} catch (err) {
77-
if (err.message !== 'setgid group id does not exist') {
77+
<<<<<<< HEAD
78+
if (err.message !== 'setgid group id does not exist' && err.code !== 'ERR_UNKNOWN_CREDENTIAL') {
79+
=======
80+
if (err.message !== 'setgid group id does not exist' &&
81+
err.message !== 'Group identifier does not exist') {
82+
>>>>>>> 0442e60902... Changed error detection from checking code to checking message
7883
throw err;
7984
}
8085
process.setgid('nogroup');

0 commit comments

Comments
 (0)