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:
Masashi Hirano 2018-08-17 07:45:55 +09:00 committed by Anna Henningsen
parent 2118342346
commit 4dc8467dbb
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -45,3 +45,10 @@ assert.throws(
}
);
});
assert.throws(() => {
process.setgroups([1, 'fhqwhgadshgnsdhjsdbkhsdabkfabkveyb']);
}, {
code: 'ERR_UNKNOWN_CREDENTIAL',
message: 'Group identifier does not exist: fhqwhgadshgnsdhjsdbkhsdabkfabkveyb'
});