Skip to content

Commit

Permalink
Move on 602-spring-data-rest module to devServices
Browse files Browse the repository at this point in the history
  • Loading branch information
pablo gonzalez granados authored and Sgitario committed May 20, 2021
1 parent 00c88ad commit 306c6d8
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 59 deletions.
1 change: 1 addition & 0 deletions 602-spring-data-rest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Used addition features and functionality:
- Hibernate Validator
- One-to-Many and Many-to-One relationship
- DevServices

Used quarkus-spring-data-rest repositories:
- CrudRepository
Expand Down
5 changes: 0 additions & 5 deletions 602-spring-data-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<!-- Skipped on Windows as does not support Linux Containers / Testcontainers -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# Using devServices
quarkus.datasource.db-kind=postgresql
quarkus.datasource.username=quarkus_test
quarkus.datasource.password=quarkus_test
quarkus.datasource.jdbc.url=jdbc:postgresql:quarkus_test
quarkus.datasource.jdbc.max-size=8
quarkus.datasource.jdbc.min-size=2
quarkus.hibernate-orm.database.generation=drop-and-create
quarkus.hibernate-orm.sql-load-script=import.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,19 @@
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.core.IsNot.not;
import static org.junit.jupiter.api.Assertions.assertEquals;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.acme.spring.data.rest.containers.PostgreSqlDatabaseTestResource;
import org.apache.http.HttpStatus;
import org.junit.Assert;
import org.junit.jupiter.api.Test;

import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.response.Response;

@QuarkusTest
@QuarkusTestResource(PostgreSqlDatabaseTestResource.class)
class BookRepositoryTest {

@Test
Expand Down Expand Up @@ -101,7 +98,7 @@ void testAllRepositoryMethods() throws InterruptedException {
.statusCode(200).extract().response();
List<String> bookNamesRepositorySortedDesc = response.jsonPath().getList("name");

Assert.assertEquals(bookNamesSortedDesc, bookNamesRepositorySortedDesc);
assertEquals(bookNamesSortedDesc, bookNamesRepositorySortedDesc);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.notNullValue;

import org.acme.spring.data.rest.containers.PostgreSqlDatabaseTestResource;
import org.apache.http.HttpStatus;
import org.junit.jupiter.api.Test;

import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;

@QuarkusTest
@QuarkusTestResource(PostgreSqlDatabaseTestResource.class)
public class LibraryRepositoryTest {
@Test
void testAllRepositoryMethods() throws InterruptedException {
Expand Down

This file was deleted.

0 comments on commit 306c6d8

Please sign in to comment.