19 lines
588 B
Java
19 lines
588 B
Java
package com.essdeebee.scheduling_service;
|
|
|
|
import org.springframework.boot.test.context.TestConfiguration;
|
|
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.testcontainers.postgresql.PostgreSQLContainer;
|
|
import org.testcontainers.utility.DockerImageName;
|
|
|
|
@TestConfiguration(proxyBeanMethods = false)
|
|
class TestcontainersConfiguration {
|
|
|
|
@Bean
|
|
@ServiceConnection
|
|
PostgreSQLContainer postgresContainer() {
|
|
return new PostgreSQLContainer(DockerImageName.parse("postgres:latest"));
|
|
}
|
|
|
|
}
|