Skip to content

Commit

Permalink
KOGITO-8979 - Data Index PostgreSQL persistence addon
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianonicolai committed Aug 28, 2023
1 parent a9afd0a commit f23108b
Show file tree
Hide file tree
Showing 161 changed files with 1,344 additions and 305 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,50 +18,30 @@

<dependencies>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${version.org.testcontainers}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>json-path</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>compile</scope>
<groupId>org.kie.kogito</groupId>
<artifactId>data-index-test-utils</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-test-utils</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>${jandex-maven-plugin.group-id}</groupId>
<artifactId>jandex-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,29 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-jackson</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>integration-tests-data-index-service-common</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>data-index-test-utils</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.kie.kogito</groupId>
<artifactId>data-index-common</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-test-utils</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.kie.kogito.index.AbstractProcessDataIndexIT;
import org.kie.kogito.test.quarkus.QuarkusTestProperty;

import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;

public abstract class AbstractProcessDataIndexInfinispanIT extends AbstractProcessDataIndexIT {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import io.quarkus.test.junit.QuarkusIntegrationTest;
import io.quarkus.test.junit.TestProfile;

import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;

@QuarkusIntegrationTest
@TestProfile(InMemoryTestProfile.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.kie.kogito.index.AbstractProcessDataIndexIT;
import org.kie.kogito.test.quarkus.QuarkusTestProperty;

import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;

public abstract class AbstractProcessDataIndexMongoDBIT extends AbstractProcessDataIndexIT {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.kie.kogito.index.AbstractProcessDataIndexIT;
import org.kie.kogito.test.quarkus.QuarkusTestProperty;

import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;

public abstract class AbstractProcessDataIndexOracleIT extends AbstractProcessDataIndexIT {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.kie.kogito.index.AbstractProcessDataIndexIT;
import org.kie.kogito.test.quarkus.QuarkusTestProperty;

import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;

public abstract class AbstractProcessDataIndexPostgreSqlIT extends AbstractProcessDataIndexIT {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.util.List;

import org.kie.kogito.index.quarkus.http.KogitoServiceRandomPortQuarkusHttpTestResource;
import org.kie.kogito.index.test.quarkus.DataIndexInMemoryQuarkusTestResource;

import io.quarkus.test.junit.QuarkusTestProfile;

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;

import org.kie.kogito.index.test.quarkus.http.DataIndexInfinispanHttpQuarkusTestResource;

import io.quarkus.test.junit.QuarkusTestProfile;

public class InfinispanHttpTestProfile implements QuarkusTestProfile {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import java.util.HashMap;
import java.util.Map;

import org.kie.kogito.index.resources.KogitoServiceRandomPortTestResource;
import org.kie.kogito.index.test.quarkus.KogitoServiceRandomPortTestResource;
import org.kie.kogito.test.resources.ConditionalQuarkusTestResource;

import static org.kie.kogito.index.resources.KogitoServiceRandomPortTestResource.KOGITO_SERVICE_URL;
import static org.kie.kogito.index.test.quarkus.KogitoServiceRandomPortTestResource.KOGITO_SERVICE_URL;

public class KogitoServiceRandomPortQuarkusHttpTestResource extends ConditionalQuarkusTestResource {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;

import org.kie.kogito.index.test.quarkus.http.DataIndexMongoDBHttpQuarkusTestResource;

import io.quarkus.test.junit.QuarkusTestProfile;

public class MongoDBHttpTestProfile implements QuarkusTestProfile {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;

import org.kie.kogito.index.test.quarkus.http.DataIndexOracleHttpQuarkusTestResource;

import io.quarkus.test.junit.QuarkusTestProfile;

public class OracleHttpTestProfile implements QuarkusTestProfile {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;

import org.kie.kogito.index.test.quarkus.http.DataIndexPostgreSqlHttpQuarkusTestResource;

import io.quarkus.test.junit.QuarkusTestProfile;

public class PostgreSqlHttpTestProfile implements QuarkusTestProfile {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;

import org.kie.kogito.index.test.quarkus.kafka.DataIndexInfinispanQuarkusKafkaTestResource;

import io.quarkus.test.junit.QuarkusTestProfile;

public class InfinispanKafkaTestProfile implements QuarkusTestProfile {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import java.util.HashMap;
import java.util.Map;

import org.kie.kogito.index.resources.KogitoServiceRandomPortTestResource;
import org.kie.kogito.index.test.quarkus.KogitoServiceRandomPortTestResource;
import org.kie.kogito.test.resources.ConditionalQuarkusTestResource;

import static org.kie.kogito.index.resources.KogitoServiceRandomPortTestResource.KOGITO_SERVICE_URL;
import static org.kie.kogito.index.test.quarkus.KogitoServiceRandomPortTestResource.KOGITO_SERVICE_URL;

public class KogitoServiceRandomPortQuarkusKafkaTestResource extends ConditionalQuarkusTestResource {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;

import org.kie.kogito.index.test.quarkus.kafka.DataIndexMongoDBQuarkusKafkaTestResource;

import io.quarkus.test.junit.QuarkusTestProfile;

public class MongoDBKafkaTestProfile implements QuarkusTestProfile {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;

import org.kie.kogito.index.test.quarkus.kafka.DataIndexOracleQuarkusKafkaTestResource;

import io.quarkus.test.junit.QuarkusTestProfile;

public class OracleKafkaTestProfile implements QuarkusTestProfile {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.util.Arrays;
import java.util.List;

import org.kie.kogito.index.test.quarkus.kafka.DataIndexPostgreSqlQuarkusKafkaTestResource;

import io.quarkus.test.junit.QuarkusTestProfile;

public class PostgreSqlKafkaTestProfile implements QuarkusTestProfile {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@
<groupId>org.kie.kogito</groupId>
<artifactId>integration-tests-data-index-service-common</artifactId>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-springboot-events-process-kafka</artifactId>
Expand All @@ -62,6 +57,38 @@
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-springboot-persistence-filesystem</artifactId>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>integration-tests-data-index-service-common</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>data-index-test-utils</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.kie.kogito</groupId>
<artifactId>data-index-common</artifactId>
</exclusion>
<exclusion>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-test-utils</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

import io.restassured.RestAssured;

import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = { KogitoApplication.class })
@ContextConfiguration(initializers = { KogitoServiceRandomPortSpringTestResource.class, DataIndexInfinispanSpringTestResource.class })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

import io.restassured.RestAssured;

import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = { KogitoApplication.class })
@ContextConfiguration(initializers = { KogitoServiceRandomPortSpringTestResource.class, DataIndexMongoDBSpringTestResource.class })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

import io.restassured.RestAssured;

import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = { KogitoApplication.class })
@ContextConfiguration(initializers = { KogitoServiceRandomPortSpringTestResource.class, DataIndexOracleSpringTestResource.class })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

import io.restassured.RestAssured;

import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = { KogitoApplication.class })
@ContextConfiguration(initializers = { KogitoServiceRandomPortSpringTestResource.class, DataIndexPostgreSqlSpringTestResource.class })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
import java.util.HashMap;
import java.util.Map;

import org.kie.kogito.index.resources.kafka.DataIndexInfinispanKafkaResource;
import org.kie.kogito.index.test.quarkus.kafka.DataIndexInfinispanKafkaResource;
import org.kie.kogito.test.resources.ConditionalSpringBootTestResource;

import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;

public class DataIndexInfinispanSpringTestResource extends ConditionalSpringBootTestResource<DataIndexInfinispanKafkaResource> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
import java.util.HashMap;
import java.util.Map;

import org.kie.kogito.index.resources.kafka.DataIndexMongoDBKafkaResource;
import org.kie.kogito.index.test.quarkus.kafka.DataIndexMongoDBKafkaResource;
import org.kie.kogito.test.resources.ConditionalSpringBootTestResource;

import static org.kie.kogito.index.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;

public class DataIndexMongoDBSpringTestResource extends ConditionalSpringBootTestResource<DataIndexMongoDBKafkaResource> {

Expand Down
Loading

0 comments on commit f23108b

Please sign in to comment.