Skip to content

Commit 4dc8467

Browse files
Masashi Hiranoaddaleax
authored andcommitted
test: add test unknown credential error of process.setgroups
Added test to check ERR_UNKNOWN_CREDENTIAL of process.setgroups to increase coverage. PR-URL: #22368 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 2118342 commit 4dc8467

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/parallel/test-process-setgroups.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,10 @@ assert.throws(
4545
}
4646
);
4747
});
48+
49+
assert.throws(() => {
50+
process.setgroups([1, 'fhqwhgadshgnsdhjsdbkhsdabkfabkveyb']);
51+
}, {
52+
code: 'ERR_UNKNOWN_CREDENTIAL',
53+
message: 'Group identifier does not exist: fhqwhgadshgnsdhjsdbkhsdabkfabkveyb'
54+
});

0 commit comments

Comments
 (0)