fix(tests): resolve EntriesIsolationIntegrationTest failures with test-specific DB config

- Added `TestExposedConfiguration` to connect Exposed with Spring `DataSource` in the `test` profile.
- Downgraded `springdoc` version from `3.0.0` to `2.8.9` for Spring Boot 3.x compatibility.
- Applied `@ActiveProfiles("test")` to `EntriesIsolationIntegrationTest`.
- Updated roadmap documentation to reflect bugfix and test success.

Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
2026-04-03 10:24:05 +02:00
parent 2270f9602f
commit f4844eb428
5 changed files with 62 additions and 1 deletions
@@ -0,0 +1,21 @@
package at.mocode.entries.service.config
import org.jetbrains.exposed.v1.jdbc.Database
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Profile
import javax.sql.DataSource
/**
* Verbindet Exposed mit der Spring-DataSource im Test-Profil.
* Ersetzt die EntriesDatabaseConfiguration (die mit @Profile("!test") ausgeschlossen ist).
*/
@Configuration
@Profile("test")
class TestExposedConfiguration {
@Bean
fun exposedDatabase(dataSource: DataSource): Database {
return Database.connect(dataSource)
}
}
@@ -18,6 +18,7 @@ import org.junit.jupiter.api.extension.ExtendWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.jdbc.core.JdbcTemplate
import org.springframework.test.context.ActiveProfiles
import org.springframework.test.context.DynamicPropertyRegistry
import org.springframework.test.context.DynamicPropertySource
import org.springframework.test.context.TestPropertySource
@@ -52,6 +53,7 @@ import kotlin.uuid.Uuid
// Als Fallback: Bean-Override in Testkontext erlauben (sollte i.d.R. nicht nötig sein)
"spring.main.allow-bean-definition-overriding=true"
])
@ActiveProfiles("test")
@Testcontainers
@TestInstance(Lifecycle.PER_CLASS)
class EntriesIsolationIntegrationTest @Autowired constructor(