Skip to content

Commit

Permalink
fix: correction des tests formations catalogues
Browse files Browse the repository at this point in the history
  • Loading branch information
moroine committed Aug 21, 2024
1 parent ab66b7a commit b246923
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 23 deletions.
92 changes: 84 additions & 8 deletions server/src/http/controllers/formationRegion.controller.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,76 @@
import { useMongo } from "@tests/utils/mongo.test.utils"
import { useServer } from "@tests/utils/server.test.utils"
import { describe, expect, it } from "vitest"
import { saveDbEntity } from "@tests/utils/user.test.utils"
import { IFormationCatalogue, zFormationCatalogueSchema } from "shared/models"
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"

// Skip from CI (ES is not populated correctly)
describe.skipIf(process.env.CI)("formationRegionV1", () => {
useMongo()
import { getDbCollection } from "@/common/utils/mongodbUtils"

useMongo()

describe("formationRegionV1", () => {
const httpClient = useServer()

beforeAll(() => {
vi.useFakeTimers()
vi.setSystemTime(new Date("2024-08-21"))

return () => {
vi.useRealTimers()
}
})

let formations: IFormationCatalogue[] = []

beforeEach(async () => {
formations = await Promise.all(
[
{
cle_ministere_educatif: "1",
code_postal: "75006",
num_departement: "75",
rome_codes: ["F1603", "F1606"],
tags: ["2024"],
},
{
cle_ministere_educatif: "2",
code_postal: "92110",
num_departement: "92",
rome_codes: ["F1603"],
tags: ["2024", "2023"],
},
{
cle_ministere_educatif: "3",
code_postal: "91000",
num_departement: "91",
rome_codes: ["F1603"],
tags: ["2024", "2023"],
},
{
cle_ministere_educatif: "4",
code_postal: "77000",
num_departement: "77",
rome_codes: ["I1308"],
tags: ["2024", "2023"],
},
{
cle_ministere_educatif: "5",
code_postal: "44980",
num_departement: "44",
rome_codes: ["N4101"],
tags: ["2024", "2023"],
},
{
cle_ministere_educatif: "6",
code_postal: "44983",
num_departement: "44",
rome_codes: ["F1603"],
tags: ["2024", "2023"],
},
].map((data) => saveDbEntity(zFormationCatalogueSchema, (item) => getDbCollection("formationcatalogues").insertOne(item), data))
)
})

it("Vérifie que la route répond", async () => {
const res = await httpClient().inject({ method: "GET", path: "/api/V1/formationsParRegion" })

Expand All @@ -15,15 +79,27 @@ describe.skipIf(process.env.CI)("formationRegionV1", () => {

it("Vérifie que la recherche avec Rome et region répond avec des résultats", async () => {
const res = await httpClient().inject({ method: "GET", path: "/api/V1/formationsParRegion?romes=F1603,I1308&region=11&caller=a" })
expect(res.statusCode).toBe(200)
expect(JSON.parse(res.body).results).not.toHaveLength(0)
expect.soft(res.statusCode).toBe(200)
expect(JSON.parse(res.body)).toEqual({
results: expect.arrayContaining([
expect.objectContaining({ cleMinistereEducatif: formations[0].cle_ministere_educatif }),
expect.objectContaining({ cleMinistereEducatif: formations[1].cle_ministere_educatif }),
expect.objectContaining({ cleMinistereEducatif: formations[2].cle_ministere_educatif }),
expect.objectContaining({ cleMinistereEducatif: formations[3].cle_ministere_educatif }),
]),
})
})

it("Vérifie que la recherche avec département répond avec des résultats", async () => {
const res = await httpClient().inject({ method: "GET", path: "/api/V1/formationsParRegion?departement=44&caller=a" })

expect(res.statusCode).toBe(200)
expect(JSON.parse(res.body).results).not.toHaveLength(0)
expect.soft(res.statusCode).toBe(200)
expect(JSON.parse(res.body)).toEqual({
results: expect.arrayContaining([
expect.objectContaining({ cleMinistereEducatif: formations[4].cle_ministere_educatif }),
expect.objectContaining({ cleMinistereEducatif: formations[5].cle_ministere_educatif }),
]),
})
})

it("Vérifie que les requêtes avec region et departement sont refusées", async () => {
Expand Down
17 changes: 9 additions & 8 deletions server/src/services/formation.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ const transformFormations = (rawFormations: IFormationCatalogue[], isMinimalData
* Adaptation au modèle LBAC et conservation des seules infos utilisées des formations
*/
const transformFormation = (rawFormation: IFormationCatalogue): ILbaItemFormation => {
const geoSource = rawFormation.lieu_formation_geo_coordonnees
const [latOpt, longOpt] = (geoSource?.split(",") ?? []).map((str) => parseFloat(str))
const latOpt = rawFormation.lieu_formation_geopoint?.coordinates[0] ?? null
const longOpt = rawFormation.lieu_formation_geopoint?.coordinates[1] ?? null
const sessions = setSessions(rawFormation)
const duration = getDurationFromSessions(sessions)

Expand Down Expand Up @@ -417,8 +417,9 @@ const transformFormation = (rawFormation: IFormationCatalogue): ILbaItemFormatio
* Adaptation au modèle LBAC et conservation des seules infos utilisées des formations
*/
const transformFormationV2 = (rawFormation: IFormationCatalogue): ILbaItemFormation2 => {
const geoSource = rawFormation.lieu_formation_geo_coordonnees
const [latOpt, longOpt] = (geoSource?.split(",") ?? []).map((str) => parseFloat(str))
const latOpt = rawFormation.lieu_formation_geopoint?.coordinates[0] ?? null
const longOpt = rawFormation.lieu_formation_geopoint?.coordinates[1] ?? null

const sessions = setSessions(rawFormation)
const duration = getDurationFromSessions(sessions)

Expand Down Expand Up @@ -492,8 +493,8 @@ const transformFormationV2 = (rawFormation: IFormationCatalogue): ILbaItemFormat
}

const transformFormationWithMinimalDataV2 = (rawFormation: IFormationCatalogue): ILbaItemFormation2 => {
const geoSource = rawFormation.lieu_formation_geo_coordonnees
const [latOpt, longOpt] = (geoSource?.split(",") ?? []).map((str) => parseFloat(str))
const latOpt = rawFormation.lieu_formation_geopoint?.coordinates[0] ?? null
const longOpt = rawFormation.lieu_formation_geopoint?.coordinates[1] ?? null

const resultFormation: ILbaItemFormation2 = {
type: LBA_ITEM_TYPE.FORMATION,
Expand Down Expand Up @@ -525,8 +526,8 @@ const transformFormationWithMinimalDataV2 = (rawFormation: IFormationCatalogue):
* Adaptation au modèle LBAC et conservation des seules infos utilisées des formations
*/
const transformFormationWithMinimalData = (rawFormation: IFormationCatalogue): ILbaItemFormation => {
const geoSource = rawFormation.lieu_formation_geo_coordonnees
const [latOpt, longOpt] = (geoSource?.split(",") ?? []).map((str) => parseFloat(str))
const latOpt = rawFormation.lieu_formation_geopoint?.coordinates[0] ?? null
const longOpt = rawFormation.lieu_formation_geopoint?.coordinates[1] ?? null

const resultFormation: ILbaItemFormation = {
ideaType: LBA_ITEM_TYPE_OLD.FORMATION,
Expand Down
9 changes: 5 additions & 4 deletions server/tests/utils/user.test.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { EntrepriseStatus, IEntreprise, IEntrepriseStatusEvent, ZEntreprise } fr
import { IJobsPartners, ZJobsPartners } from "shared/models/jobsPartners.model"
import { AccessEntityType, AccessStatus, IRoleManagement, IRoleManagementEvent } from "shared/models/roleManagement.model"
import { IUserWithAccount, UserEventType, ZUserWithAccount } from "shared/models/userWithAccount.model"
import { ZodArray, ZodObject, ZodString, ZodTypeAny } from "zod"
import { ZodArray, ZodObject, ZodString, ZodTypeAny, z } from "zod"
import { Fixture, Generator } from "zod-fixture"

import { getDbCollection } from "@/common/utils/mongodbUtils"
Expand Down Expand Up @@ -71,11 +71,12 @@ function getFixture() {
])
}

export const saveDbEntity = async <T>(schema: ZodTypeAny, saveEntity: (item: T) => Promise<any>, data: Partial<T>) => {
const entity = {
export const saveDbEntity = async <Z extends ZodTypeAny>(schema: Z, saveEntity: (item: z.output<Z>) => Promise<any>, data: Partial<z.output<Z>>): Promise<z.output<Z>> => {
const entity = schema.parse({
...getFixture().fromSchema(schema),
...data,
}
})

await saveEntity(entity)

Check failure on line 80 in server/tests/utils/user.test.utils.ts

View workflow job for this annotation

GitHub Actions / tests / Tests

src/http/controllers/formationRegion.controller.test.ts > formationRegionV1 > Vérifie que la recherche avec Rome et region répond avec des résultats

MongoServerError: Can't extract geo keys: { _id: ObjectId('66c52e00dc351e42a69fd77d'), cle_ministere_educatif: "1", cfd: "osxvikkbshsysfj", cfd_specialite: null, cfd_outdated: null, cfd_date_fermeture: new Date(2553011488982), cfd_entree: null, mef_10_code: null, mefs_10: null, nom_academie: "vyzdmokujsfmcfn", num_academie: null, code_postal: "75006", code_commune_insee: "hwmuziepdhcmoji", num_departement: "75", nom_departement: "mltll-yvejuilnl", region: null, localite: null, uai_formation: null, nom: null, intitule_long: "ascltvosstznszb", intitule_court: "qpgx-dzmwrmrwwd", intitule_rco: null, diplome: "cuvnkdsjnikivez", niveau: "ouxvmocmvvnxfsx", onisep_url: null, onisep_intitule: null, onisep_libelle_poursuite: "xkhgmevktwdvrrb", onisep_lien_site_onisepfr: "vmlzqttbwuunael", onisep_discipline: "bfovqkwpzfdvgpr", onisep_domaine_sousdomaine: "gopleavsxnafoov", rncp_code: null, rncp_intitule: null, rncp_eligible_apprentissage: false, rncp_details: null, rome_codes: [ "F1603", "F1606" ], capacite: null, duree: null, annee: null, email: null, parcoursup_statut: null, parcoursup_error: null, parcoursup_statut_history: null, parcoursup_reference: null, parcoursup_a_charger: false, parcoursup_id: null, parcoursup_visible: null, affelnet_reference: null, affelnet_a_charger: false, affelnet_statut: "kvobwarjxbre-an", affelnet_statut_history: null, affelnet_visible: null, source: "dfiapizb--goabw", commentaires: null, opcos: [ "uxjqfxyaxhkhodm", "safsibtjelseoof", "rintsepfujkkzf-" ], info_opcos: null, info_opcos_intitule: null, published: false, rco_published: true, draft: null, created_at: "znwybkareqouobn", updates_history: null, last_update_at: null, last_update_who: null, to_update: null, update_error: "xtkradd-azhlhqq", lieu_formation_geo_coordonnees: "fwtrhuefvicgdqs", lieu_formation_geopoint: { coordinates: [ 79.12199650891125, -22.06737897358835 ], type: "rmachsuwzqsgnvu" }, lieu_formation_adresse: null, lieu_formation_adresse_computed: null, lieu_formation_siret: null, id_rco_formation: "nbqpg-wklsydwcc", id_formation: null, id_action: null, ids_action: [ "yofmhyobtpnitab", "pppyqqtjg-td-bk", "ekjjqxpiqysrlie" ], id_certifinfo: null, tags: [ "2024" ], libelle_court: null, niveau_formation_diplome: "yzgmsag-abbkxoq", affelnet_infos_offre: null, affelnet_code_nature: null, affelnet_secteur: null, affelnet_raison_depublication: null, bcn_mefs_10: null, editedFields: { uxcxstycdimnjnm: "ZodUnknown", egkrhkbukfsmlck: "ZodUnknown", ozsidyrofbyvubl: "ZodUnknown" }, parcoursup_raison_depublication: null, distance_lieu_formation_etablissement_formateur: null, niveau_entree_obligatoire: null, entierement_a_distance: null, catalogue_published: null, contenu: "mzpnbrutscgwyyu", objectif: null, date_debut: null, date_fin: null, modalites_entrees_sorties: null, num_tel: null, distance: 79.80019822716713, etablissement_formateur_id: null, etablissement_formateur_siret: null, etablissement_formateur_enseigne: null, etablissement_formateur_uai: null, etablissement_formateur_type: "zglvpnjevtavxsm", etablissement_formateur_conventionne: null, etablissement_formateur_declare_prefecture: "xdlo-kkjwmthbaf", etablissement_formateur_datadock: null, etablissement_formateur_adresse: null, etablissement_formateur_code_postal: null, etablissement_formateur_code_commune_insee: "mrhh-mb-pjztzwc", etablissement_formateur_localite: null, etablissement_formateur_complement_adresse: null, etablissement_formateur_cedex: null, etablissement_formateur_entreprise_raison_sociale: null, geo_coordonnees_etablissement_formateur: null, etablissement_formateur_region: null, etablissement_formateur_num_departement: null, etablissement_formateur_nom_departement: null, etablissement_formateur_nom_academie: null, etablissement_formateur_num_academie: null, etablissement_formateur_siren: null, etablissement_formateur_courriel: null, etablissement_formateur_published: null, etablissement_formateur_catalogue_published: null, rncp_etablissement_formateur_habilite: false, etablissement_formateur_date_creation: null, etablissement_gestionnaire_id: null, etablissement_ge

Check failure on line 80 in server/tests/utils/user.test.utils.ts

View workflow job for this annotation

GitHub Actions / tests / Tests

src/http/controllers/formationRegion.controller.test.ts > formationRegionV1 > Vérifie que la recherche avec département répond avec des résultats

MongoServerError: Can't extract geo keys: { _id: ObjectId('66c52e00dc351e42a69fd783'), cle_ministere_educatif: "1", cfd: "gxwy-e-umuqquvr", cfd_specialite: null, cfd_outdated: false, cfd_date_fermeture: null, cfd_entree: null, mef_10_code: null, mefs_10: [ "mgoj-aqjeztfzio", "maqbsrhxbavuovf", "qronmmnzsadgdtw" ], nom_academie: "qspysgimqgckoqb", num_academie: null, code_postal: "75006", code_commune_insee: null, num_departement: "75", nom_departement: null, region: null, localite: "wmkldafnnmtv-ax", uai_formation: null, nom: null, intitule_long: "djegaxkdegbq-pj", intitule_court: null, intitule_rco: "duupfme-lojx-rd", diplome: null, niveau: null, onisep_url: "cr-kfac-huraops", onisep_intitule: null, onisep_libelle_poursuite: null, onisep_lien_site_onisepfr: null, onisep_discipline: null, onisep_domaine_sousdomaine: null, rncp_code: null, rncp_intitule: null, rncp_eligible_apprentissage: null, rncp_details: { hbyufeidfgohjay: "ZodUnknown", qsbumgequy-o-ki: "ZodUnknown", -wuwaccelwwpxja: "ZodUnknown" }, rome_codes: [ "F1603", "F1606" ], capacite: "dzw-kxervhyywet", duree: null, annee: null, email: null, parcoursup_statut: null, parcoursup_error: null, parcoursup_statut_history: null, parcoursup_reference: null, parcoursup_a_charger: null, parcoursup_id: null, parcoursup_visible: false, affelnet_reference: null, affelnet_a_charger: false, affelnet_statut: null, affelnet_statut_history: null, affelnet_visible: null, source: null, commentaires: "yidqizvftdbktsa", opcos: null, info_opcos: -61.20713800191879, info_opcos_intitule: null, published: true, rco_published: true, draft: null, created_at: null, updates_history: [ { gsshoesyfbemnjh: "ZodUnknown", --cf-t-xnsjdyvj: "ZodUnknown", pzfcxroqimledga: "ZodUnknown" }, { zhymtbgiuviqhuu: "ZodUnknown", slhxehcwnfwaisq: "ZodUnknown", ejixssnqxiwtioa: "ZodUnknown" }, { cxmwzaaedeohaid: "ZodUnknown", sjoyuddvubcbqlc: "ZodUnknown", pfbzobexjpswpnj: "ZodUnknown" } ], last_update_at: "xjltozpyznbgyvv", last_update_who: "lpiadobnmfuqeau", to_update: null, update_error: null, lieu_formation_geo_coordonnees: null, lieu_formation_geopoint: { coordinates: [ -51.25949457287788, 23.01483834162354 ], type: "bbwfqbwvnnmhbvj" }, lieu_formation_adresse: null, lieu_formation_adresse_computed: null, lieu_formation_siret: "94770756516212", id_rco_formation: null, id_formation: null, id_action: "fhqjtpgabkzj-rz", ids_action: null, id_certifinfo: null, tags: [ "2024" ], libelle_court: null, niveau_formation_diplome: null, affelnet_infos_offre: null, affelnet_code_nature: "ivpypfamwizmjtq", affelnet_secteur: null, affelnet_raison_depublication: null, bcn_mefs_10: [ { m-ubeaajcudhmsj: "ZodUnknown", ypfokxacbzwdsdc: "ZodUnknown", v-kedu-sdddexet: "ZodUnknown" }, { zqqlaxiqirmmvad: "ZodUnknown", hipobmnyodsbmmb: "ZodUnknown", dthfageqfv-sdop: "ZodUnknown" }, { -mqzydexvht-emy: "ZodUnknown", -mfpfnbxn-vprxd: "ZodUnknown", zajymjkqnnpxqix: "ZodUnknown" } ], editedFields: null, parcoursup_raison_depublication: null, distance_lieu_formation_etablissement_formateur: null, niveau_entree_obligatoire: null, entierement_a_distance: null, catalogue_published: true, contenu: "iyjkqgggasssiuv", objectif: null, date_debut: null, date_fin: null, modalites_entrees_sorties: null, num_tel: null, distance: -95.34478248097003, etablissement_formateur_id: null, etablissement_formateur_siret: null, etablissement_formateur_enseigne: null, etablissement_formateur_uai: null, etablissement_formateur_type: null, etablissement_formateur_conventionne: "xvvjhpy-xpnozih", etablissement_formateur_declare_prefecture: null, etablissement_formateur_datadock: null, etablissement_formateur_adresse: null, etablissement_formateur_code_postal: null, etablissement_formateur_code_commune_insee: null, etablissement_formateur_localite: null, etablissement_formateur_complement_adresse: null, etablissement_formateur_cedex: null, etablissement_formateur_entreprise_raison_sociale: null, geo_coordonnees_etablissement_formateur: null, etablissement_formateur_region: "anfypyshrvxdsyw", etablissement_formateur_num_departement: null, etablissement_formateu

Check failure on line 80 in server/tests/utils/user.test.utils.ts

View workflow job for this annotation

GitHub Actions / tests / Tests

src/http/controllers/formationRegion.controller.test.ts > formationRegionV1 > Vérifie que les requêtes avec region et departement sont refusées

MongoServerError: Can't extract geo keys: { _id: ObjectId('66c52e00dc351e42a69fd789'), cle_ministere_educatif: "1", cfd: "qfwooobgtdhnqex", cfd_specialite: null, cfd_outdated: true, cfd_date_fermeture: null, cfd_entree: null, mef_10_code: null, mefs_10: null, nom_academie: null, num_academie: null, code_postal: "75006", code_commune_insee: null, num_departement: "75", nom_departement: null, region: null, localite: null, uai_formation: "yhqtvbvstocoyjk", nom: "jbjwftfbhckac-e", intitule_long: null, intitule_court: null, intitule_rco: null, diplome: "xmj-kdatbyvzrzd", niveau: null, onisep_url: null, onisep_intitule: null, onisep_libelle_poursuite: null, onisep_lien_site_onisepfr: null, onisep_discipline: "qxveate-nylwlpw", onisep_domaine_sousdomaine: "qliuuladde--phk", rncp_code: null, rncp_intitule: "zuktrjtskzysbin", rncp_eligible_apprentissage: null, rncp_details: { usjcru-ilpbfcxf: "ZodUnknown", hykjwyccwqwci-s: "ZodUnknown", -ezssxynjrrdfkj: "ZodUnknown" }, rome_codes: [ "F1603", "F1606" ], capacite: null, duree: null, annee: null, email: "[email protected]", parcoursup_statut: "xxtuxwxrvcmrcwi", parcoursup_error: null, parcoursup_statut_history: null, parcoursup_reference: null, parcoursup_a_charger: true, parcoursup_id: null, parcoursup_visible: true, affelnet_reference: null, affelnet_a_charger: null, affelnet_statut: null, affelnet_statut_history: null, affelnet_visible: true, source: null, commentaires: null, opcos: null, info_opcos: null, info_opcos_intitule: null, published: null, rco_published: null, draft: null, created_at: "qcirgpokpxqdqfc", updates_history: null, last_update_at: "fbkje-nybjbtsib", last_update_who: null, to_update: null, update_error: null, lieu_formation_geo_coordonnees: null, lieu_formation_geopoint: { coordinates: [ 6.47675758227706, -53.25786485336721 ], type: "hbwruyh-xygcbpo" }, lieu_formation_adresse: "ysjzwacjchvqxfj", lieu_formation_adresse_computed: "xaczdhlpaudjaxl", lieu_formation_siret: "81952222258729", id_rco_formation: "fudfvmpjugiixdr", id_formation: null, id_action: null, ids_action: null, id_certifinfo: "-oedxlrggpuubjn", tags: [ "2024" ], libelle_court: [ "mzvzvoorjmnnqjv", "adxztwjcglccujz", "slbeuugmjdzkaft" ], niveau_formation_diplome: null, affelnet_infos_offre: null, affelnet_code_nature: null, affelnet_secteur: "qvshyqopajertjz", affelnet_raison_depublication: null, bcn_mefs_10: null, editedFields: null, parcoursup_raison_depublication: null, distance_lieu_formation_etablissement_formateur: null, niveau_entree_obligatoire: null, entierement_a_distance: null, catalogue_published: null, contenu: null, objectif: null, date_debut: [ "ffxhthodfjowidw", "pptuegawgnegubw", "kijuamhxw-ettu-" ], date_fin: [ "xqjjh-actfalrga", "bxajvyjfsvydfal", "rwmsyscdguvlohx" ], modalites_entrees_sorties: null, num_tel: "ctilnccfeatgrve", distance: 77.27810917422175, etablissement_formateur_id: null, etablissement_formateur_siret: null, etablissement_formateur_enseigne: null, etablissement_formateur_uai: null, etablissement_formateur_type: null, etablissement_formateur_conventionne: null, etablissement_formateur_declare_prefecture: null, etablissement_formateur_datadock: null, etablissement_formateur_adresse: null, etablissement_formateur_code_postal: null, etablissement_formateur_code_commune_insee: null, etablissement_formateur_localite: null, etablissement_formateur_complement_adresse: null, etablissement_formateur_cedex: null, etablissement_formateur_entreprise_raison_sociale: null, geo_coordonnees_etablissement_formateur: null, etablissement_formateur_region: null, etablissement_formateur_num_departement: null, etablissement_formateur_nom_departement: null, etablissement_formateur_nom_academie: "imjnundaliwlnbs", etablissement_formateur_num_academie: "--dzjp-qzwyffhc", etablissement_formateur_siren: null, etablissement_formateur_courriel: null, etablissement_formateur_published: null, etablissement_formateur_catalogue_published: null, rncp_etablissement_formateur_habilite: null, etablissement_formateur_date_creation: null, etablissement_gestionnaire_id: "fnkbpoksmnzlpsj", etablisseme

Check failure on line 80 in server/tests/utils/user.test.utils.ts

View workflow job for this annotation

GitHub Actions / tests / Tests

src/http/controllers/formationRegion.controller.test.ts > formationRegionV1 > Vérifie que les requêtes avec departement mal formé sont refusées

MongoServerError: Can't extract geo keys: { _id: ObjectId('66c52e00dc351e42a69fd793'), cle_ministere_educatif: "5", cfd: "hjb-unmioitxwwu", cfd_specialite: null, cfd_outdated: null, cfd_date_fermeture: null, cfd_entree: "ebjlnqegahbs-wi", mef_10_code: null, mefs_10: null, nom_academie: "mvuzkntrktkmsvg", num_academie: "vrwmjrucbrrnvus", code_postal: "44980", code_commune_insee: null, num_departement: "44", nom_departement: null, region: null, localite: null, uai_formation: null, nom: "h-poxbbnjzrvuvz", intitule_long: "kwobmlnykx-sbqe", intitule_court: "nlkbvputasrmljh", intitule_rco: null, diplome: null, niveau: null, onisep_url: null, onisep_intitule: null, onisep_libelle_poursuite: null, onisep_lien_site_onisepfr: null, onisep_discipline: null, onisep_domaine_sousdomaine: "cnajl-mkqdfxqro", rncp_code: null, rncp_intitule: "koe-rqhwcmre-nt", rncp_eligible_apprentissage: null, rncp_details: null, rome_codes: [ "N4101" ], capacite: null, duree: null, annee: null, email: "[email protected]", parcoursup_statut: null, parcoursup_error: null, parcoursup_statut_history: [ { kcdppyanxkybrzr: "ZodUnknown", tmmksejtnursb-o: "ZodUnknown", tslyrupxhdyteuk: "ZodUnknown" }, { gmdrrwup-hrikcs: "ZodUnknown", qpnsqshsyxkxscx: "ZodUnknown", qzit-bxb-ipat-j: "ZodUnknown" }, { rvcftpjqvjhjboe: "ZodUnknown", brimz-sdryecawf: "ZodUnknown", fvwnztwxxrtvdwd: "ZodUnknown" } ], parcoursup_reference: null, parcoursup_a_charger: true, parcoursup_id: null, parcoursup_visible: null, affelnet_reference: null, affelnet_a_charger: true, affelnet_statut: null, affelnet_statut_history: null, affelnet_visible: null, source: null, commentaires: null, opcos: null, info_opcos: -85.00976450741291, info_opcos_intitule: "hzcbnbiyzzhfprl", published: null, rco_published: null, draft: null, created_at: null, updates_history: null, last_update_at: null, last_update_who: "hnwlrgxvekrcaza", to_update: false, update_error: null, lieu_formation_geo_coordonnees: "dqfbiufacqybate", lieu_formation_geopoint: { coordinates: [ 44.41184741444886, -84.63729405775666 ], type: "nchfbxfvxnhydkd" }, lieu_formation_adresse: null, lieu_formation_adresse_computed: null, lieu_formation_siret: null, id_rco_formation: null, id_formation: "tiypaojbsvofoiz", id_action: "zqxvqgqpsx-xxve", ids_action: null, id_certifinfo: null, tags: [ "2024", "2023" ], libelle_court: [ "lewi-kuiafsoqlz", "jjqyvgkupvhetoh", "sfvghabwjxrwrgk" ], niveau_formation_diplome: null, affelnet_infos_offre: null, affelnet_code_nature: null, affelnet_secteur: null, affelnet_raison_depublication: null, bcn_mefs_10: [ { fxwypjslrvrcpow: "ZodUnknown", rpeticqedobqbyo: "ZodUnknown", luxnjrdtkzpkpug: "ZodUnknown" }, { miltczxjnevrpae: "ZodUnknown", mpkubmeoau-gnzh: "ZodUnknown", jvpmsfu-zbjkaeb: "ZodUnknown" }, { rchshxmekfmaglj: "ZodUnknown", pivwvbc-lwezgoq: "ZodUnknown", szebchjaqkblzxz: "ZodUnknown" } ], editedFields: { slpjcaufuuqpfnv: "ZodUnknown", -souwrpvejlefog: "ZodUnknown", dmnxkcheu-gn-ny: "ZodUnknown" }, parcoursup_raison_depublication: "gppfgdvbztsxx-y", distance_lieu_formation_etablissement_formateur: null, niveau_entree_obligatoire: null, entierement_a_distance: null, catalogue_published: null, contenu: null, objectif: null, date_debut: null, date_fin: null, modalites_entrees_sorties: null, num_tel: "qfhwdaptekdkzwf", distance: null, etablissement_formateur_id: null, etablissement_formateur_siret: null, etablissement_formateur_enseigne: null, etablissement_formateur_uai: null, etablissement_formateur_type: null, etablissement_formateur_conventionne: null, etablissement_formateur_declare_prefecture: null, etablissement_formateur_datadock: null, etablissement_formateur_adresse: null, etablissement_formateur_code_postal: null, etablissement_formateur_code_commune_insee: null, etablissement_formateur_localite: null, etablissement_formateur_complement_adresse: null, etablissement_formateur_cedex: null, etablissement_formateur_entreprise_raison_sociale: null, geo_coordonnees_etablissement_formateur: null, etablissement_formateur_region: null, etablissement_formateur_num_departement: null, etablissement_formateur

Check failure on line 80 in server/tests/utils/user.test.utils.ts

View workflow job for this annotation

GitHub Actions / tests / Tests

src/http/controllers/formationRegion.controller.test.ts > formationRegionV1 > Vérifie que les requêtes avec region mal formée sont refusées

MongoServerError: Can't extract geo keys: { _id: ObjectId('66c52e00dc351e42a69fd797'), cle_ministere_educatif: "3", cfd: "slyhcxueqawzxsa", cfd_specialite: null, cfd_outdated: null, cfd_date_fermeture: new Date(3899019647334), cfd_entree: "ceu--xcnekjmwtu", mef_10_code: "gdlfpcdzdbyqrti", mefs_10: null, nom_academie: null, num_academie: null, code_postal: "91000", code_commune_insee: null, num_departement: "91", nom_departement: null, region: "mpcedhywajejttc", localite: "dtdumgyiud-qvey", uai_formation: null, nom: null, intitule_long: null, intitule_court: null, intitule_rco: "dqufrl-chtmkyjy", diplome: null, niveau: null, onisep_url: null, onisep_intitule: null, onisep_libelle_poursuite: null, onisep_lien_site_onisepfr: "nhwutwaya-ulksv", onisep_discipline: null, onisep_domaine_sousdomaine: null, rncp_code: null, rncp_intitule: null, rncp_eligible_apprentissage: null, rncp_details: null, rome_codes: [ "F1603" ], capacite: "-vasfv-hcicenwf", duree: null, annee: null, email: null, parcoursup_statut: null, parcoursup_error: null, parcoursup_statut_history: null, parcoursup_reference: null, parcoursup_a_charger: null, parcoursup_id: null, parcoursup_visible: null, affelnet_reference: null, affelnet_a_charger: null, affelnet_statut: null, affelnet_statut_history: null, affelnet_visible: null, source: null, commentaires: null, opcos: null, info_opcos: null, info_opcos_intitule: "drrnuchfdltqhih", published: null, rco_published: null, draft: null, created_at: null, updates_history: null, last_update_at: null, last_update_who: "ilmqttbmuklbpbw", to_update: null, update_error: "xhsxsduv-pjusvs", lieu_formation_geo_coordonnees: "wgokswszipnv-pr", lieu_formation_geopoint: { coordinates: [ 42.48441043309867, -97.95387019403279 ], type: "qgfjyjqknjuldxd" }, lieu_formation_adresse: null, lieu_formation_adresse_computed: "ivxdpktlclppnrl", lieu_formation_siret: null, id_rco_formation: "cdovprdjglfzoyn", id_formation: "rwizkoco-mnmcei", id_action: null, ids_action: null, id_certifinfo: null, tags: [ "2024", "2023" ], libelle_court: null, niveau_formation_diplome: null, affelnet_infos_offre: null, affelnet_code_nature: null, affelnet_secteur: null, affelnet_raison_depublication: null, bcn_mefs_10: null, editedFields: null, parcoursup_raison_depublication: null, distance_lieu_formation_etablissement_formateur: null, niveau_entree_obligatoire: null, entierement_a_distance: null, catalogue_published: null, contenu: null, objectif: "pxccwlvygiqmgt-", date_debut: null, date_fin: null, modalites_entrees_sorties: [ true, false, true ], num_tel: null, distance: 13.52030918933451, etablissement_formateur_id: null, etablissement_formateur_siret: "62006652591225", etablissement_formateur_enseigne: null, etablissement_formateur_uai: null, etablissement_formateur_type: null, etablissement_formateur_conventionne: null, etablissement_formateur_declare_prefecture: null, etablissement_formateur_datadock: null, etablissement_formateur_adresse: null, etablissement_formateur_code_postal: null, etablissement_formateur_code_commune_insee: null, etablissement_formateur_localite: null, etablissement_formateur_complement_adresse: null, etablissement_formateur_cedex: null, etablissement_formateur_entreprise_raison_sociale: null, geo_coordonnees_etablissement_formateur: null, etablissement_formateur_region: null, etablissement_formateur_num_departement: "stp-udqawrk-xzb", etablissement_formateur_nom_departement: null, etablissement_formateur_nom_academie: null, etablissement_formateur_num_academie: null, etablissement_formateur_siren: null, etablissement_formateur_courriel: null, etablissement_formateur_published: null, etablissement_formateur_catalogue_published: null, rncp_etablissement_formateur_habilite: null, etablissement_formateur_date_creation: null, etablissement_gestionnaire_id: null, etablissement_gestionnaire_siret: null, etablissement_gestionnaire_enseigne: null, etablissement_gestionnaire_uai: null, etablissement_gestionnaire_type: null, etablissement_gestionnaire_conventionne: "rqvpnotq-emdog-", etablissement_gestionnaire_declare_prefecture: null,

Check failure on line 80 in server/tests/utils/user.test.utils.ts

View workflow job for this annotation

GitHub Actions / tests / Tests

src/http/controllers/formationRegion.controller.test.ts > formationRegionV1 > Vérifie que les requêtes avec code region hors liste sont refusées

MongoServerError: Can't extract geo keys: { _id: ObjectId('66c52e00dc351e42a69fd7a0'), cle_ministere_educatif: "6", cfd: "etvqqemecbmxjqd", cfd_specialite: null, cfd_outdated: null, cfd_date_fermeture: new Date(3943036074150), cfd_entree: null, mef_10_code: null, mefs_10: null, nom_academie: "-eqiqoalahoqkdb", num_academie: null, code_postal: "44983", code_commune_insee: "z-pvkiacgsglsdq", num_departement: "44", nom_departement: "kgeruilofopea-w", region: null, localite: null, uai_formation: null, nom: null, intitule_long: null, intitule_court: null, intitule_rco: null, diplome: "fobziwkuhowpj-h", niveau: null, onisep_url: null, onisep_intitule: "veca-lukfhaawft", onisep_libelle_poursuite: null, onisep_lien_site_onisepfr: null, onisep_discipline: null, onisep_domaine_sousdomaine: null, rncp_code: null, rncp_intitule: null, rncp_eligible_apprentissage: null, rncp_details: null, rome_codes: [ "F1603" ], capacite: null, duree: null, annee: "bkisirtprhxpmkd", email: null, parcoursup_statut: null, parcoursup_error: null, parcoursup_statut_history: null, parcoursup_reference: null, parcoursup_a_charger: null, parcoursup_id: null, parcoursup_visible: true, affelnet_reference: null, affelnet_a_charger: null, affelnet_statut: "lcfayrmipnsydgq", affelnet_statut_history: null, affelnet_visible: null, source: "cqhsexzqvhrcxmv", commentaires: "yxoivdyjiychgrl", opcos: null, info_opcos: null, info_opcos_intitule: "nolnfsdhjgzeifo", published: null, rco_published: null, draft: true, created_at: null, updates_history: null, last_update_at: "ntidh-ahq-nlbah", last_update_who: null, to_update: null, update_error: null, lieu_formation_geo_coordonnees: null, lieu_formation_geopoint: { coordinates: [ 97.13009144179523, 10.57861768640578 ], type: "qscujggtvjmr-rk" }, lieu_formation_adresse: null, lieu_formation_adresse_computed: null, lieu_formation_siret: null, id_rco_formation: null, id_formation: "fsbxpisfatnvgjr", id_action: "skknzwdsjtdfyox", ids_action: null, id_certifinfo: "ew-onohg-c-ypyx", tags: [ "2024", "2023" ], libelle_court: "stwyxxkvxrwczev", niveau_formation_diplome: null, affelnet_infos_offre: null, affelnet_code_nature: null, affelnet_secteur: null, affelnet_raison_depublication: "zr-aheionsmr-ge", bcn_mefs_10: null, editedFields: { eujruwtripocnjr: "ZodUnknown", ggp--knyyrlvjnr: "ZodUnknown", snxfgtnhpaurbe-: "ZodUnknown" }, parcoursup_raison_depublication: null, distance_lieu_formation_etablissement_formateur: null, niveau_entree_obligatoire: null, entierement_a_distance: null, catalogue_published: null, contenu: null, objectif: null, date_debut: [ "p--xchikfwhinek", "kzwszpbcfqs-jdg", "hxiuwsdstjohivl" ], date_fin: null, modalites_entrees_sorties: null, num_tel: null, distance: null, etablissement_formateur_id: null, etablissement_formateur_siret: null, etablissement_formateur_enseigne: null, etablissement_formateur_uai: null, etablissement_formateur_type: null, etablissement_formateur_conventionne: null, etablissement_formateur_declare_prefecture: null, etablissement_formateur_datadock: null, etablissement_formateur_adresse: null, etablissement_formateur_code_postal: "clpsaimeo-hwpxa", etablissement_formateur_code_commune_insee: "ijodiowuhf-qmcw", etablissement_formateur_localite: null, etablissement_formateur_complement_adresse: null, etablissement_formateur_cedex: null, etablissement_formateur_entreprise_raison_sociale: null, geo_coordonnees_etablissement_formateur: null, etablissement_formateur_region: null, etablissement_formateur_num_departement: null, etablissement_formateur_nom_departement: null, etablissement_formateur_nom_academie: null, etablissement_formateur_num_academie: null, etablissement_formateur_siren: "ucgaezcwlsslbey", etablissement_formateur_courriel: "octerzhrzntrolq", etablissement_formateur_published: null, etablissement_formateur_catalogue_published: false, rncp_etablissement_formateur_habilite: null, etablissement_formateur_date_creation: new Date(-1472753583689), etablissement_gestionnaire_id: "ix-semacunvmjem", etablissement_gestionnaire_siret: null, etablissement_gestionnaire_enseigne: null,

Check failure on line 80 in server/tests/utils/user.test.utils.ts

View workflow job for this annotation

GitHub Actions / tests / Tests

src/http/controllers/formationRegion.controller.test.ts > formationRegionV1 > Vérifie que les requêtes avec ROME et domaine ROME sont refusées

MongoServerError: Can't extract geo keys: { _id: ObjectId('66c52e00dc351e42a69fd7a4'), cle_ministere_educatif: "4", cfd: "rsgyufi-ztbclky", cfd_specialite: "necvlhubxyiycev", cfd_outdated: null, cfd_date_fermeture: new Date(1772870847895), cfd_entree: null, mef_10_code: null, mefs_10: [ "kfhm-zkxicfenlb", "hhgq-kqlxpclexs", "-xacytbuutbogde" ], nom_academie: null, num_academie: "mozaavvdbcrldfc", code_postal: "77000", code_commune_insee: "e-sydbxanglgarn", num_departement: "77", nom_departement: null, region: null, localite: "pwftinrgts-pumb", uai_formation: null, nom: null, intitule_long: null, intitule_court: null, intitule_rco: null, diplome: "gpsvimgqupxihdp", niveau: null, onisep_url: null, onisep_intitule: null, onisep_libelle_poursuite: "zrfblcusttqnqrg", onisep_lien_site_onisepfr: "ptrttaddbmpivnz", onisep_discipline: "tlevmgxfachagry", onisep_domaine_sousdomaine: null, rncp_code: null, rncp_intitule: null, rncp_eligible_apprentissage: null, rncp_details: null, rome_codes: [ "I1308" ], capacite: null, duree: "beq-ldldzpu-uat", annee: "jbkjaiooyiwtigm", email: "[email protected]", parcoursup_statut: null, parcoursup_error: null, parcoursup_statut_history: null, parcoursup_reference: null, parcoursup_a_charger: true, parcoursup_id: null, parcoursup_visible: null, affelnet_reference: null, affelnet_a_charger: null, affelnet_statut: null, affelnet_statut_history: null, affelnet_visible: null, source: null, commentaires: "xikozc-mi-zynnh", opcos: null, info_opcos: null, info_opcos_intitule: null, published: null, rco_published: true, draft: null, created_at: null, updates_history: null, last_update_at: null, last_update_who: null, to_update: false, update_error: null, lieu_formation_geo_coordonnees: null, lieu_formation_geopoint: { coordinates: [ -86.53913149610162, -95.72553061880171 ], type: "lzmyfvquhmlikaq" }, lieu_formation_adresse: null, lieu_formation_adresse_computed: null, lieu_formation_siret: null, id_rco_formation: null, id_formation: null, id_action: "btcqtcyokxiafjo", ids_action: null, id_certifinfo: null, tags: [ "2024", "2023" ], libelle_court: [ "gwciwnqyprahyou", "qsigrolvwchflvo", "dvpkqydjvhaiwzm" ], niveau_formation_diplome: null, affelnet_infos_offre: null, affelnet_code_nature: null, affelnet_secteur: null, affelnet_raison_depublication: "xetm-btfmspc-xl", bcn_mefs_10: null, editedFields: null, parcoursup_raison_depublication: null, distance_lieu_formation_etablissement_formateur: null, niveau_entree_obligatoire: null, entierement_a_distance: null, catalogue_published: null, contenu: null, objectif: null, date_debut: [ "puhxhzusnmcqjt-", "dehcotnkqzrawpw", "ufqixnrjfpclhbt" ], date_fin: [ "tgsmbjwlovgujro", "uucoyxdhujbsocb", "yhscfglffpxnvwl" ], modalites_entrees_sorties: null, num_tel: "n-yas--ahoeagqe", distance: -53.89748243615031, etablissement_formateur_id: null, etablissement_formateur_siret: null, etablissement_formateur_enseigne: null, etablissement_formateur_uai: null, etablissement_formateur_type: null, etablissement_formateur_conventionne: "rmdwatahdhxpqgc", etablissement_formateur_declare_prefecture: null, etablissement_formateur_datadock: null, etablissement_formateur_adresse: null, etablissement_formateur_code_postal: null, etablissement_formateur_code_commune_insee: "fufkvzsdleruqfi", etablissement_formateur_localite: null, etablissement_formateur_complement_adresse: null, etablissement_formateur_cedex: null, etablissement_formateur_entreprise_raison_sociale: null, geo_coordonnees_etablissement_formateur: null, etablissement_formateur_region: "ifiimtybhhfggqw", etablissement_formateur_num_departement: "schvcaguwfkhbnz", etablissement_formateur_nom_departement: "pdcwj-wavzqcmqn", etablissement_formateur_nom_academie: null, etablissement_formateur_num_academie: null, etablissement_formateur_siren: null, etablissement_formateur_courriel: "muvroorxqxcbmsa", etablissement_formateur_published: null, etablissement_formateur_catalogue_published: null, rncp_etablissement_formateur_habilite: null, etablissement_formateur_date_creation: null, etablissement_gestionnaire_id: null, etablisseme

Check failure on line 80 in server/tests/utils/user.test.utils.ts

View workflow job for this annotation

GitHub Actions / tests / Tests

src/http/controllers/formationRegion.controller.test.ts > formationRegionV1 > Vérifie que les requêtes avec ROME mal formé sont refusées

MongoServerError: Can't extract geo keys: { _id: ObjectId('66c52e00dc351e42a69fd7aa'), cle_ministere_educatif: "4", cfd: "adflqwcrqmbwza-", cfd_specialite: null, cfd_outdated: null, cfd_date_fermeture: null, cfd_entree: null, mef_10_code: null, mefs_10: null, nom_academie: null, num_academie: null, code_postal: "77000", code_commune_insee: null, num_departement: "77", nom_departement: null, region: "vwvpkynzvvmqumc", localite: null, uai_formation: null, nom: null, intitule_long: "pakmtbmnsxsjsyp", intitule_court: "wvyrqttoimbykki", intitule_rco: null, diplome: null, niveau: null, onisep_url: null, onisep_intitule: "bqxmxyauizoyzid", onisep_libelle_poursuite: null, onisep_lien_site_onisepfr: null, onisep_discipline: null, onisep_domaine_sousdomaine: null, rncp_code: null, rncp_intitule: null, rncp_eligible_apprentissage: null, rncp_details: { carjmfaluzwhulv: "ZodUnknown", ixo-kmkogvxwadh: "ZodUnknown", nszflmk-x-tulnk: "ZodUnknown" }, rome_codes: [ "I1308" ], capacite: null, duree: "lzuvkwbklvmacek", annee: "hchtactlifkzbne", email: null, parcoursup_statut: null, parcoursup_error: "ehvjvorsdgpshih", parcoursup_statut_history: null, parcoursup_reference: null, parcoursup_a_charger: null, parcoursup_id: "lmkseeammlwyjgd", parcoursup_visible: null, affelnet_reference: null, affelnet_a_charger: null, affelnet_statut: "kzzgsylpshtqfuh", affelnet_statut_history: null, affelnet_visible: true, source: null, commentaires: null, opcos: [ "jxxjpwcnnoovfpb", "laettc-ppzzkqnk", "kzxjhda-rbwryja" ], info_opcos: null, info_opcos_intitule: null, published: null, rco_published: null, draft: null, created_at: null, updates_history: null, last_update_at: null, last_update_who: null, to_update: null, update_error: null, lieu_formation_geo_coordonnees: null, lieu_formation_geopoint: { coordinates: [ -8.643614128232002, 34.08455150201917 ], type: "bcwynhjgfdrxnfz" }, lieu_formation_adresse: "tahfuxqeuuuphlr", lieu_formation_adresse_computed: null, lieu_formation_siret: null, id_rco_formation: null, id_formation: "rmkdetv-bld-pmq", id_action: "hq-pyoakvnnazyv", ids_action: null, id_certifinfo: null, tags: [ "2024", "2023" ], libelle_court: [ "rjoyfmpmvykizzc", "uezsxrjkteayadr", "gyycjpiinysxutm" ], niveau_formation_diplome: null, affelnet_infos_offre: "qar-rbwcuxxuqye", affelnet_code_nature: "b-a-gesoqkcxfbm", affelnet_secteur: null, affelnet_raison_depublication: "zhmjoilkafrtbhi", bcn_mefs_10: null, editedFields: { jfvbtq-rmruryez: "ZodUnknown", kihodxbnkdnrqsm: "ZodUnknown", gadtu-wzshmnaf-: "ZodUnknown" }, parcoursup_raison_depublication: null, distance_lieu_formation_etablissement_formateur: null, niveau_entree_obligatoire: 93.83982974104583, entierement_a_distance: true, catalogue_published: null, contenu: "wjaukdumqmwpxnu", objectif: null, date_debut: null, date_fin: null, modalites_entrees_sorties: null, num_tel: "qpzywo-vnpfuwel", distance: null, etablissement_formateur_id: "grfr-vpnzhfxlue", etablissement_formateur_siret: null, etablissement_formateur_enseigne: null, etablissement_formateur_uai: null, etablissement_formateur_type: null, etablissement_formateur_conventionne: "wkaoragkoxifkyh", etablissement_formateur_declare_prefecture: null, etablissement_formateur_datadock: null, etablissement_formateur_adresse: null, etablissement_formateur_code_postal: null, etablissement_formateur_code_commune_insee: null, etablissement_formateur_localite: null, etablissement_formateur_complement_adresse: null, etablissement_formateur_cedex: null, etablissement_formateur_entreprise_raison_sociale: null, geo_coordonnees_etablissement_formateur: null, etablissement_formateur_region: null, etablissement_formateur_num_departement: null, etablissement_formateur_nom_departement: null, etablissement_formateur_nom_academie: null, etablissement_formateur_num_academie: null, etablissement_formateur_siren: "vpibmmut-spvzak", etablissement_formateur_courriel: null, etablissement_formateur_published: null, etablissement_formateur_catalogue_published: null, rncp_etablissement_formateur_habilite: null, etablissement_formateur_date_creation: null, etablissement

Check failure on line 80 in server/tests/utils/user.test.utils.ts

View workflow job for this annotation

GitHub Actions / tests / Tests

src/http/controllers/formationRegion.controller.test.ts > formationRegionV1 > Vérifie que les requêtes avec trop de ROME sont refusées

MongoServerError: Can't extract geo keys: { _id: ObjectId('66c52e00dc351e42a69fd7ad'), cle_ministere_educatif: "1", cfd: "-ngg-othoxibfcs", cfd_specialite: null, cfd_outdated: true, cfd_date_fermeture: null, cfd_entree: "qbwoye-fnxjuxzk", mef_10_code: null, mefs_10: null, nom_academie: "klipgvgknyyrmt-", num_academie: null, code_postal: "75006", code_commune_insee: "wjpieyngfgnynul", num_departement: "75", nom_departement: null, region: null, localite: null, uai_formation: null, nom: null, intitule_long: null, intitule_court: null, intitule_rco: null, diplome: null, niveau: null, onisep_url: null, onisep_intitule: null, onisep_libelle_poursuite: null, onisep_lien_site_onisepfr: "kujtfphvsewgfau", onisep_discipline: null, onisep_domaine_sousdomaine: null, rncp_code: null, rncp_intitule: null, rncp_eligible_apprentissage: null, rncp_details: { ipbcffydqtb-hkt: "ZodUnknown", z-kmtkwqaiwvmqh: "ZodUnknown", qwbaeuoypkgaucu: "ZodUnknown" }, rome_codes: [ "F1603", "F1606" ], capacite: null, duree: null, annee: null, email: null, parcoursup_statut: null, parcoursup_error: "-ttnkbcnpkbuptu", parcoursup_statut_history: [ { zrzbqsfkvfvvr-u: "ZodUnknown", -nxnlbrbxgpdqkg: "ZodUnknown", spoorbkulagwvqg: "ZodUnknown" }, { fhfwcejepgbugnm: "ZodUnknown", senlndkacfrboxg: "ZodUnknown", wdgjyozynesjvji: "ZodUnknown" }, { darfbta-tsvbxvm: "ZodUnknown", oftfrpschajirsx: "ZodUnknown", lzdqmboikskdfsg: "ZodUnknown" } ], parcoursup_reference: null, parcoursup_a_charger: null, parcoursup_id: null, parcoursup_visible: null, affelnet_reference: null, affelnet_a_charger: true, affelnet_statut: null, affelnet_statut_history: null, affelnet_visible: null, source: "tgtdcpfquocppgm", commentaires: null, opcos: null, info_opcos: -2.035113470628858, info_opcos_intitule: "giywdmjijemkpcl", published: null, rco_published: null, draft: null, created_at: null, updates_history: null, last_update_at: "qburtvbzdknoetf", last_update_who: null, to_update: null, update_error: null, lieu_formation_geo_coordonnees: "lzpvybrhizqcsfe", lieu_formation_geopoint: { coordinates: [ -61.26580475829542, -68.74130521900952 ], type: "-ylbxxgxtrzyxao" }, lieu_formation_adresse: "neshzuuvmnaco-j", lieu_formation_adresse_computed: "gkcxjtzibddbxmy", lieu_formation_siret: null, id_rco_formation: "cthpqwviftvzwry", id_formation: null, id_action: null, ids_action: [ "ahuhuiwnuittjq-", "onneyvwbaikxize", "tpnaiinwg-vrjhi" ], id_certifinfo: null, tags: [ "2024" ], libelle_court: null, niveau_formation_diplome: "xbdzqe-ylatj-vc", affelnet_infos_offre: null, affelnet_code_nature: "me-sibyvhghsayj", affelnet_secteur: null, affelnet_raison_depublication: null, bcn_mefs_10: [ { sgkeamvkwgmpfqb: "ZodUnknown", jrnsmyvx-ajlbcy: "ZodUnknown", j-fnyvufzwtjdfh: "ZodUnknown" }, { ygvlwbsu-vepoqf: "ZodUnknown", encyxjdynqucpww: "ZodUnknown", wnlwjddxmurwysh: "ZodUnknown" }, { f-qq-hiakrcibor: "ZodUnknown", yrynviqjkycpgiv: "ZodUnknown", zinp-pxuhnwkehx: "ZodUnknown" } ], editedFields: null, parcoursup_raison_depublication: null, distance_lieu_formation_etablissement_formateur: null, niveau_entree_obligatoire: null, entierement_a_distance: null, catalogue_published: null, contenu: "gsyiigwuzmqdjdy", objectif: "awdkezvflhvbqgn", date_debut: null, date_fin: [ "d-kefsxolomttge", "msrxp-fhaazacwo", "chwgog-enjntvr-" ], modalites_entrees_sorties: null, num_tel: null, distance: null, etablissement_formateur_id: null, etablissement_formateur_siret: null, etablissement_formateur_enseigne: null, etablissement_formateur_uai: null, etablissement_formateur_type: null, etablissement_formateur_conventionne: null, etablissement_formateur_declare_prefecture: null, etablissement_formateur_datadock: null, etablissement_formateur_adresse: null, etablissement_formateur_code_postal: null, etablissement_formateur_code_commune_insee: null, etablissement_formateur_localite: null, etablissement_formateur_complement_adresse: null, etablissement_formateur_cedex: null, etablissement_formateur_entreprise_raison_sociale: null, geo_coordonnees_etablissement_formateur: null, etablissement_formateur_region: null, etablissement_fo

Check failure on line 80 in server/tests/utils/user.test.utils.ts

View workflow job for this annotation

GitHub Actions / tests / Tests

src/http/controllers/formationRegion.controller.test.ts > formationRegionV1 > Vérifie que les requêtes sans caller sont refusées

MongoServerError: Can't extract geo keys: { _id: ObjectId('66c52e00dc351e42a69fd7b3'), cle_ministere_educatif: "1", cfd: "ebxonn-oagysqzi", cfd_specialite: "dfnxxbmpmoxlsqc", cfd_outdated: false, cfd_date_fermeture: null, cfd_entree: null, mef_10_code: null, mefs_10: null, nom_academie: null, num_academie: "etsfcothsdgzaqw", code_postal: "75006", code_commune_insee: null, num_departement: "75", nom_departement: "-jhmdlqoiutyuut", region: "shmtjmvexrfaxue", localite: null, uai_formation: null, nom: null, intitule_long: "-cwbyfwdjjo-ddy", intitule_court: null, intitule_rco: null, diplome: null, niveau: null, onisep_url: null, onisep_intitule: null, onisep_libelle_poursuite: "pgzddwurfjxwbvq", onisep_lien_site_onisepfr: null, onisep_discipline: null, onisep_domaine_sousdomaine: null, rncp_code: null, rncp_intitule: null, rncp_eligible_apprentissage: null, rncp_details: null, rome_codes: [ "F1603", "F1606" ], capacite: "ilxicxhffjgvjvm", duree: "w-zjdobsw--kntq", annee: null, email: "[email protected]", parcoursup_statut: null, parcoursup_error: null, parcoursup_statut_history: null, parcoursup_reference: false, parcoursup_a_charger: null, parcoursup_id: null, parcoursup_visible: null, affelnet_reference: null, affelnet_a_charger: null, affelnet_statut: null, affelnet_statut_history: null, affelnet_visible: null, source: null, commentaires: null, opcos: null, info_opcos: -32.15124295093119, info_opcos_intitule: null, published: null, rco_published: null, draft: true, created_at: null, updates_history: null, last_update_at: null, last_update_who: null, to_update: false, update_error: null, lieu_formation_geo_coordonnees: "usutiyfgqncoedw", lieu_formation_geopoint: { coordinates: [ 61.03809042833745, 66.77729152143002 ], type: "duitikavrocfv-z" }, lieu_formation_adresse: null, lieu_formation_adresse_computed: null, lieu_formation_siret: "44477717954190", id_rco_formation: null, id_formation: null, id_action: null, ids_action: null, id_certifinfo: null, tags: [ "2024" ], libelle_court: null, niveau_formation_diplome: null, affelnet_infos_offre: null, affelnet_code_nature: null, affelnet_secteur: null, affelnet_raison_depublication: null, bcn_mefs_10: null, editedFields: null, parcoursup_raison_depublication: null, distance_lieu_formation_etablissement_formateur: null, niveau_entree_obligatoire: -37.73694601841271, entierement_a_distance: null, catalogue_published: null, contenu: null, objectif: "twufk-kljbepfwn", date_debut: null, date_fin: null, modalites_entrees_sorties: null, num_tel: null, distance: null, etablissement_formateur_id: null, etablissement_formateur_siret: null, etablissement_formateur_enseigne: null, etablissement_formateur_uai: null, etablissement_formateur_type: null, etablissement_formateur_conventionne: "phaipalz-ytmzdg", etablissement_formateur_declare_prefecture: null, etablissement_formateur_datadock: null, etablissement_formateur_adresse: null, etablissement_formateur_code_postal: null, etablissement_formateur_code_commune_insee: null, etablissement_formateur_localite: null, etablissement_formateur_complement_adresse: null, etablissement_formateur_cedex: null, etablissement_formateur_entreprise_raison_sociale: null, geo_coordonnees_etablissement_formateur: null, etablissement_formateur_region: "cludgok-kzalddd", etablissement_formateur_num_departement: null, etablissement_formateur_nom_departement: "olsmsagfzcsnbxu", etablissement_formateur_nom_academie: null, etablissement_formateur_num_academie: "cztpaqjcojb-tf-", etablissement_formateur_siren: "omh-crbspheeh-f", etablissement_formateur_courriel: null, etablissement_formateur_published: true, etablissement_formateur_catalogue_published: null, rncp_etablissement_formateur_habilite: null, etablissement_formateur_date_creation: null, etablissement_gestionnaire_id: null, etablissement_gestionnaire_siret: null, etablissement_gestionnaire_enseigne: null, etablissement_gestionnaire_uai: null, etablissement_gestionnaire_type: null, etablissement_gestionnaire_conventionne: "dqaybxmhhzfthoe", etablissement_gestionnaire_declare_prefecture: null, etablissement_g
return entity
}
Expand Down
7 changes: 4 additions & 3 deletions shared/models/formation.model.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { extensions } from "../helpers/zodHelpers/zodPrimitives"
import { z } from "../helpers/zodWithOpenApi"

import { ZPointGeometry } from "./address.model"
Expand All @@ -10,7 +11,7 @@ const geoCoordSchema = z.string()
const etablissementFormateurSchema = z
.object({
etablissement_formateur_id: z.string().nullish(),
etablissement_formateur_siret: z.string().nullish(),
etablissement_formateur_siret: extensions.siret.nullish(),
etablissement_formateur_enseigne: z.string().nullish(),
etablissement_formateur_uai: z.string().nullish(),
etablissement_formateur_type: z.string().nullish(),
Expand Down Expand Up @@ -43,7 +44,7 @@ const etablissementFormateurSchema = z
const etablissementGestionnaireSchema = z
.object({
etablissement_gestionnaire_id: z.string().nullish(),
etablissement_gestionnaire_siret: z.string().nullish(),
etablissement_gestionnaire_siret: extensions.siret.nullish(),
etablissement_gestionnaire_enseigne: z.string().nullish(),
etablissement_gestionnaire_uai: z.string().nullish(),
etablissement_gestionnaire_type: z.string().nullish(),
Expand Down Expand Up @@ -161,7 +162,7 @@ export const zFormationCatalogueSchema = z
lieu_formation_geopoint: ZPointGeometry.nullish(),
lieu_formation_adresse: z.string().nullish(),
lieu_formation_adresse_computed: z.string().nullish(),
lieu_formation_siret: z.string().nullish(),
lieu_formation_siret: extensions.siret.nullish(),
id_rco_formation: z.string().nullish(),
id_formation: z.string().nullish(),
id_action: z.string().nullish(),
Expand Down

0 comments on commit b246923

Please sign in to comment.