work on tests
This commit is contained in:
parent
7e13d8d466
commit
cdbcdcff38
@ -55,8 +55,9 @@ public abstract class AbstractPersistenceServerServiceTest {
|
||||
@MockBean
|
||||
protected PDFTronRedactionClient pdfTronRedactionClient;
|
||||
|
||||
|
||||
@ClassRule
|
||||
public static PostgreSQLContainer postgreSQLContainer = new PostgreSQLContainer("postgres:11.1")
|
||||
public static PostgreSQLContainer postgreSQLContainer = SpringPostgreSQLTestContainer.getInstance()
|
||||
.withDatabaseName("integration-tests-db")
|
||||
.withUsername("sa")
|
||||
.withPassword("sa");
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
package com.iqser.red.service.peristence.v1.server.integration.utils;
|
||||
|
||||
import org.testcontainers.containers.PostgreSQLContainer;
|
||||
|
||||
public class SpringPostgreSQLTestContainer extends PostgreSQLContainer<SpringPostgreSQLTestContainer> {
|
||||
|
||||
private static final String IMAGE_VERSION = "postgres:11.1";
|
||||
private static SpringPostgreSQLTestContainer container;
|
||||
|
||||
private SpringPostgreSQLTestContainer() {
|
||||
super(IMAGE_VERSION);
|
||||
}
|
||||
|
||||
public static SpringPostgreSQLTestContainer getInstance() {
|
||||
if (container == null) {
|
||||
container = new SpringPostgreSQLTestContainer();
|
||||
}
|
||||
return container;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user