Sorry for the inconvenience, I am working on a pro...
# rancher-desktop
a
Sorry for the inconvenience, I am working on a project with springboot + kotlin, and I have a funny issue. Basically, for running IntegrationTests we are using Test containers here we configure Postgres
Copy code
@TestConfiguration(proxyBeanMethods = false)
 class TestContainersConfiguration {
 
     @Bean
     @ServiceConnection
     fun postgresContainer(): PostgreSQLContainer<*> {
         return PostgreSQLContainer(DockerImageName.parse("postgres:16.4"))
     }
 }
this works fine in docker desktop, but in rancher this doesn't work, I got an exception from flyway dependency of host not found but if I configure the Postgres container like the following:
Copy code
companion object {
     private val pg = PostgreSQLContainer(DockerImageName.parse("postgres:16.4"))
     init {
         pg.start()
     }
 
     @JvmStatic
     @DynamicPropertySource
     fun registerDynamicProperties(registry: DynamicPropertyRegistry) {
         registry.add("spring.datasource.url", pg::getJdbcUrl)
         registry.add("spring.datasource.username", pg::getUsername)
         registry.add("spring.datasource.password", pg::getPassword)
     }
 }
now rancher-desktop works, how can I make it work using the first approach?