Skip to content

Commit

Permalink
fix dora services check errors
Browse files Browse the repository at this point in the history
adding a test

test add

test

chore(pipeline) : Fix unit tests

Note : the code was incorrect, thank us for unit testing it.

Side note : ARRAY is unsupported for the `dict` data type in unit tests,
currently, so we have to use SQL, meaning we also have to define each
and every field out there.

Other side note : as a side effect, this checks that the 'profils' field
is made empty when going from 'stg' to 'int' layer with DORA services.

dropping the tests

fix conflict

fix rebase

fix typo
  • Loading branch information
YannickPassa authored and vperron committed Oct 23, 2024
1 parent be473c7 commit 9e98106
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ final AS (
services.modes_accueil AS "modes_accueil",
services.modes_orientation_accompagnateur AS "modes_orientation_accompagnateur",
services.modes_orientation_accompagnateur_autres AS "modes_orientation_accompagnateur_autres",
services.modes_orientation_beneficiaire AS "modes_orientation_beneficiaire",
/* The 'professionnel' condition is not included in the associated seed. Therefore, after discussing it,
we decided to convert it into a null value to still take it in account in our tables and avoid a global schema change */
CASE
WHEN 'professionnel' = ANY(services.modes_orientation_beneficiaire) THEN NULL
ELSE services.modes_orientation_beneficiaire
END AS "modes_orientation_beneficiaire",
services.modes_orientation_beneficiaire_autres AS "modes_orientation_beneficiaire_autres",
services.nom AS "nom",
services.presentation_resume AS "presentation_resume",
Expand Down Expand Up @@ -59,7 +64,10 @@ final AS (
services.contact_nom_prenom AS "contact_nom_prenom",
services.courriel AS "courriel",
services.telephone AS "telephone",
ARRAY[services.frais] AS "frais"
CASE
WHEN services.frais IS NULL THEN NULL
ELSE ARRAY[services.frais]
END AS "frais"
FROM services
)

Expand Down

0 comments on commit 9e98106

Please sign in to comment.