Initial commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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"));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user