Some checks failed
Tests unitaires / Brain (Python · pytest + couverture) (push) Successful in 21s
Tests unitaires / Web (Angular · vitest + couverture) (push) Successful in 30s
Tests unitaires / Core (Java · mvn test + JaCoCo) (push) Successful in 2m22s
Build & Push Images / build (brain) (push) Successful in 1m16s
E2E Tests / e2e (push) Failing after 5m24s
Build & Push Images / build (core) (push) Successful in 3m5s
Build & Push Images / build-switcher (push) Successful in 50s
Build & Push Images / build (web) (push) Successful in 1m56s
Correction de tests coté java + config Suppression de classes inutilisées coté Angular
66 lines
3.3 KiB
Properties
66 lines
3.3 KiB
Properties
# Configuration de test : vraie base PostgreSQL loremind_test.
|
|
#
|
|
# La base `loremind_test` doit exister sur l'instance locale (port 5432).
|
|
# AUCUN credential reel ici (fichier versionne !) : definissez les variables
|
|
# d'environnement en local (IDE ou shell) comme en CI :
|
|
# SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, SPRING_DATASOURCE_PASSWORD
|
|
spring.datasource.url=${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/loremind_test}
|
|
spring.datasource.username=${SPRING_DATASOURCE_USERNAME:loremind_test}
|
|
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD:loremind_test}
|
|
spring.datasource.driver-class-name=org.postgresql.Driver
|
|
|
|
# Configuration JPA pour les tests : schema recree a chaque run, pas de logs SQL.
|
|
spring.jpa.hibernate.ddl-auto=create-drop
|
|
spring.jpa.show-sql=false
|
|
|
|
# Flyway desactive en test : le schema est gere par Hibernate create-drop
|
|
# (recree a chaque run), pas par les migrations. Evite tout conflit Flyway/DDL.
|
|
spring.flyway.enabled=false
|
|
|
|
# Pool Hikari volontairement minuscule en test : la suite cree de nombreux
|
|
# contextes Spring distincts (combinaisons de @MockitoBean / @TestPropertySource),
|
|
# tous gardes en cache simultanement. Avec le pool par defaut (10), on epuisait
|
|
# les connexions Postgres ("remaining connection slots are reserved"). 2 par
|
|
# contexte suffit (tests sequentiels) et borne le total bien sous max_connections.
|
|
spring.datasource.hikari.maximum-pool-size=2
|
|
spring.datasource.hikari.minimum-idle=0
|
|
spring.datasource.hikari.idle-timeout=10000
|
|
|
|
# Credentials admin factices pour satisfaire le fail-closed de SecurityConfig.
|
|
admin.username=test-admin
|
|
admin.password=test-admin-password
|
|
|
|
# Brain et MinIO : URLs factices — aucun appel reseau attendu dans les tests
|
|
# de persistence. MinioConfig est tolerant (PostConstruct capture).
|
|
brain.base-url=http://localhost:0
|
|
brain.timeout-seconds=5
|
|
brain.internal-secret=test-secret
|
|
minio.endpoint=http://localhost:9000
|
|
minio.access-key=test
|
|
minio.secret-key=test
|
|
minio.bucket=test-bucket
|
|
|
|
# open-in-view fixe explicitement (defaut true) : supprime l'avertissement au boot.
|
|
spring.jpa.open-in-view=true
|
|
|
|
# Le daemon de refresh de licence (@Scheduled) n'a rien a faire pendant les tests :
|
|
# son tick echouait en arriere-plan (table licenses droppee par le create-drop
|
|
# partage entre contextes) => stacktraces parasites. On le desactive ici.
|
|
licensing.refresh.enabled=false
|
|
|
|
# --- Sortie de test LISIBLE ---------------------------------------------------
|
|
# Pas de banniere Spring (repetee a chaque contexte), et seuls les WARN/ERROR
|
|
# remontent : la masse d'INFO de demarrage (Spring/Hibernate/Hikari, "Started
|
|
# XxxTest", seeder...) n'apporte rien et noyait les vrais signaux.
|
|
spring.main.banner-mode=off
|
|
logging.level.root=WARN
|
|
# Tests de CHEMIN D'ERREUR : les controleurs loggent VOLONTAIREMENT l'echec (ex:
|
|
# Watchtower injoignable -> 502, Brain down -> 502) AVANT de renvoyer le bon statut
|
|
# HTTP teste. L'exception est attrapee, jamais propagee : ce sont des logs attendus.
|
|
logging.level.com.loremind.infrastructure.web.controller=OFF
|
|
# WARN attendus sur des tests de robustesse (registry injoignable, suppression best-effort).
|
|
logging.level.com.loremind.infrastructure.updates.UpdateCheckService=ERROR
|
|
logging.level.com.loremind.infrastructure.ai.BrainNotebookIndexClient=ERROR
|
|
# Le warning MinIO au @PostConstruct (serveur absent en test) est ATTENDU.
|
|
logging.level.com.loremind.infrastructure.storage=ERROR
|