Skip to content

Fix/use h2 for sonarqube#18

Closed
profotoce59 wants to merge 5 commits into
mainfrom
fix/use_h2_sonarqube
Closed

Fix/use h2 for sonarqube#18
profotoce59 wants to merge 5 commits into
mainfrom
fix/use_h2_sonarqube

Conversation

@profotoce59

Copy link
Copy Markdown
Collaborator

To fix failing contextLoads tests when PostgreSQL is not available (especially in CI), we implemented the following:

Added H2 test dependency in [pom.xml]
Kept test profile usage with @activeprofiles("test") in SpringBootJavaRandomUserApplicationTests.
Updated Sonar GitHub Actions workflow to:
generate [application-test.properties] from APPLICATION_TEST_PROPERTIES secret,

New secret has been added to the GitHub secret : APPLICATION_TEST_PROPERTIES
spring.datasource.url=jdbc:h2:mem:testdb;MODE=PostgreSQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.username=<any_username>
spring.datasource.password=
spring.sql.init.mode=never

@profotoce59 profotoce59 linked an issue Feb 27, 2026 that may be closed by this pull request
@sonarqube-xpeho

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
19 New issues
27.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE SonarQube for IDE

@MayuriXx MayuriXx deleted the fix/use_h2_sonarqube branch April 16, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Sonarqube dependency to postgres database

3 participants