Skip to content

test(server-nestjs): cas limites du client Registry (pagination, contrats d'erreur) - #2586

Draft
shikanime wants to merge 3 commits into
mainfrom
test/adv-registry
Draft

test(server-nestjs): cas limites du client Registry (pagination, contrats d'erreur)#2586
shikanime wants to merge 3 commits into
mainfrom
test/adv-registry

Conversation

@shikanime

Copy link
Copy Markdown
Member

Issues liées

#2574


Quel est le comportement actuel ?

registry-client.service.ts était à ~23% de lignes couvertes : le contrat « caller-decides » des statuts HTTP, la pagination asynchrone et les gardes NaN de getRetentionId n'étaient pas verrouillés.

Quel est le nouveau comportement ?

+109 lignes / 9 tests :

  • statuts non-2xx (409/500) renvoyés en data sans throw — contrat caller-decides ;
  • 204 → data:null ; repli text/plain quand le content-type n'est pas JSON ;
  • pagination jusqu'à page incomplète (page_size=100) et arrêt sur première page vide ;
  • getRetentionId : null sur lookup KO ou retention_id absent/NaN.

27/27 tests verts sur Node 24.

Cette PR introduit-elle un breaking change ?

Non.

…error edges

Co-authored-by: Automata <automata@shikanime.studio>
@github-actions github-actions Bot added the built label Aug 25, 2026
@shikanime shikanime changed the title test(server-nestjs): couverture adversariale du client Registry (pagination, contrats d'erreur) test(server-nestjs): cas limites du client Registry (pagination, contrats d'erreur) Aug 26, 2026
shikanime and others added 2 commits August 26, 2026 11:37
Co-authored-by: Automata <automata@shikanime.studio>
Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>
Change-Id: I256fbe0de561639b7acd46621bb2a84f6a6a6964
@cloud-pi-native-sonarqube

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant