QAC-Portal/QA-Portal

Change cv-api test config

Aperta

#174 aperta il 16 dic 2019

 (0 commenti) (0 reazioni) (0 assegnatari)Java (5 fork)auto 404
Low PriorityTestinggood first issuejava

Metriche repository

Star
 (2 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Currently, tests for cv-api rely on their own config file, cv-api/src/test/resources/application.yml.

This is necessary for line #35: enable_public_endpoints: true

This overrides development's default application.yml file, where this value is set to false, and is necessary for smoke testing the PublicCvManagementController.

However as seen by #173, this causes issue every time the cv-api config is changed.

Rather than duplicate all changes to the main config file in the test package's config file, a better solution might be to implement Spring Boot's @ActiveProfiles annotation, which allows the tests to load their own altered version of application.yml.

Guida contributor