21 lines
607 B
Java
21 lines
607 B
Java
package ru.tubryansk.tdms;
|
|
|
|
|
|
import org.springframework.boot.test.context.TestConfiguration;
|
|
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.testcontainers.containers.PostgreSQLContainer;
|
|
import org.testcontainers.utility.DockerImageName;
|
|
|
|
|
|
@TestConfiguration(proxyBeanMethods = false)
|
|
class TestcontainersConfiguration {
|
|
|
|
@Bean
|
|
@ServiceConnection
|
|
PostgreSQLContainer<?> postgresContainer() {
|
|
return new PostgreSQLContainer<>(DockerImageName.parse("postgres:16.2-alpine3.19"));
|
|
}
|
|
|
|
}
|