Skip to content

Commit

Permalink
test: add test unknown credential error of process.setgroups
Browse files Browse the repository at this point in the history
Added test to check ERR_UNKNOWN_CREDENTIAL of process.setgroups to
increase coverage.

PR-URL: nodejs#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>
  • Loading branch information
Masashi Hirano authored and addaleax committed Aug 24, 2018
1 parent 2118342 commit 4dc8467
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/parallel/test-process-setgroups.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,10 @@ assert.throws(
}
);
});

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

0 comments on commit 4dc8467

Please sign in to comment.