From 574666133cff30960c023bc157b605709521cdea Mon Sep 17 00:00:00 2001 From: Igor Dianov Date: Mon, 7 Aug 2023 08:41:24 -0700 Subject: [PATCH] AAE-15938 Add Activiti Modeling Service Liquibase integration tests with Postgres --- .../activiti-cloud-modeling/liquibase/pom.xml | 24 +++++++++++++++++-- .../init/ModelingLiquibaseApplicationIT.java | 11 ++++++++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/activiti-cloud-examples/activiti-cloud-modeling/liquibase/pom.xml b/activiti-cloud-examples/activiti-cloud-modeling/liquibase/pom.xml index 5b288a30cf2..ac937fa50f7 100644 --- a/activiti-cloud-examples/activiti-cloud-modeling/liquibase/pom.xml +++ b/activiti-cloud-examples/activiti-cloud-modeling/liquibase/pom.xml @@ -41,6 +41,16 @@ postgresql runtime + + org.activiti.cloud + activiti-cloud-services-modeling-jpa + test + + + org.springframework.boot + spring-boot-starter-data-jpa + test + org.springframework.boot spring-boot-starter-test @@ -52,8 +62,18 @@ test - com.h2database - h2 + org.springframework.boot + spring-boot-testcontainers + test + + + org.testcontainers + junit-jupiter + test + + + org.testcontainers + postgresql test diff --git a/activiti-cloud-examples/activiti-cloud-modeling/liquibase/src/test/java/org/activiti/cloud/query/init/ModelingLiquibaseApplicationIT.java b/activiti-cloud-examples/activiti-cloud-modeling/liquibase/src/test/java/org/activiti/cloud/query/init/ModelingLiquibaseApplicationIT.java index f4fc19d56dd..0abeeeec939 100644 --- a/activiti-cloud-examples/activiti-cloud-modeling/liquibase/src/test/java/org/activiti/cloud/query/init/ModelingLiquibaseApplicationIT.java +++ b/activiti-cloud-examples/activiti-cloud-modeling/liquibase/src/test/java/org/activiti/cloud/query/init/ModelingLiquibaseApplicationIT.java @@ -18,10 +18,19 @@ import org.activiti.cloud.modeling.liquibase.ModelingLiquibaseApplication; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.testcontainers.service.connection.ServiceConnection; +import org.testcontainers.containers.PostgreSQLContainer; +import org.testcontainers.junit.jupiter.Container; +import org.testcontainers.junit.jupiter.Testcontainers; -@SpringBootTest(classes = { ModelingLiquibaseApplication.class }) +@SpringBootTest(classes = { ModelingLiquibaseApplication.class }, properties = "spring.jpa.hibernate.ddl-auto=validate") +@Testcontainers public class ModelingLiquibaseApplicationIT { + @Container + @ServiceConnection + static PostgreSQLContainer postgres = new PostgreSQLContainer<>("postgres:15-alpine"); + @Test public void contextLoads() {} }