Skip to content

test(server-nestjs): cas limites du module Observability (plugin, client YAML) - #2587

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

test(server-nestjs): cas limites du module Observability (plugin, client YAML)#2587
shikanime wants to merge 3 commits into
mainfrom
test/adv-obsv

Conversation

@shikanime

Copy link
Copy Markdown
Member

Issues liées

#2574


Quel est le comportement actuel ?

Les services plugin et client du module observability étaient à 11% et 12% de lignes couvertes : le cycle de vie Grafana (URLs par type d'environnement, descripteur de config) et le round-trip YAML du fichier de valeurs n'étaient pas testés.

Quel est le nouveau comportement ?

+2 specs / 28 tests :

  • observability-plugin.service.spec.ts : URLs hprod/prod selon les stages, erreur projet introuvable, contrat du descripteur (switch global admin-writable, instances read-only) ;
  • observability-client.service.spec.ts : répo values existant/créé, fallback init + clone sûr, garde zod sur YAML invalide, idempotence updateProjectConfig (pas de commit si identique), suppression ciblée préservant les projets voisins.

36/36 tests verts sur Node 24.

Cette PR introduit-elle un breaking change ?

Non.

…nment

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 module Observability (plugin, client YAML) test(server-nestjs): cas limites du module Observability (plugin, client YAML) Aug 26, 2026
…ility specs

Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>
Change-Id: I35c94382a862ea25935947720c4a05916a6a6964
Annotate the repo const with CondensedProjectSchemaWith<'id'> instead of
as unknown as, build the created-repo value via makeProjectSchema instead of
as ProjectSchema, and read the commit content arg without as string, per
server-nestjs vitest convention.

Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>
Change-Id: Ia05cf77e80581a7513da8f83fa1604366a6a6964
@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