test: add test unknown credential error of process.setgroups
Added test to check ERR_UNKNOWN_CREDENTIAL of process.setgroups to increase coverage. PR-URL: https://github.com/nodejs/node/pull/22368 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
parent
2118342346
commit
4dc8467dbb
@ -45,3 +45,10 @@ assert.throws(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
assert.throws(() => {
|
||||||
|
process.setgroups([1, 'fhqwhgadshgnsdhjsdbkhsdabkfabkveyb']);
|
||||||
|
}, {
|
||||||
|
code: 'ERR_UNKNOWN_CREDENTIAL',
|
||||||
|
message: 'Group identifier does not exist: fhqwhgadshgnsdhjsdbkhsdabkfabkveyb'
|
||||||
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user