test(admin-role): lock member counts against OIDC role ids - #2783
Merged
Merged
Conversation
The member-counts endpoint ignores OIDC-backed role ids: the frozen legacy handler emitted NaN for them, failing response validation (see #2781). Pin the server-nestjs behaviour: OIDC ids excluded, finite values, and output compliant with the z.record(z.number().min(0)) contract. Refs #2781 Co-authored-by: Automata <automata@shikanime.studio> Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>
This was referenced Sep 28, 2026
|
StephaneTrebel
approved these changes
Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

0 New Issues
0 Fixed Issues
0 Accepted Issues
No data about coverage (60.90% Estimated after merge)
Issues liées
Refs #2781
Quel est le comportement actuel ?
Le décompte des membres des rôles admin (exclusion des ids de rôles adossés à OIDC, cf. #2781) n'est pas verrouillé : une régression dans
getAdminRoleMemberCountspasserait inaperçue.Quel est le nouveau comportement ?
Spec ajoutée dans
admin-role.service.spec.ts: exclusion des ids OIDC, valeurs finies, réponse conforme au contratz.record(z.number().min(0)). Test indépendant du routage — s'applique surmaintel quel.Cette PR introduit-elle un breaking change ?
Non.
Autres informations
typeof counts[roleId] === 'number'→+ "…": NaN, cf. 🐛 [BUG] - Décompte des membres des rôles admin en échec 500 (NaN) quand des rôles OIDC sont portés #2781).