diff --git a/.gitignore b/.gitignore index 1723d5a..f8d87dc 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,4 @@ TODO.txt database/ docu OldEnrollmentEndpoint.java -dependency.tree +dependency*.tree diff --git a/pom.xml b/pom.xml index 8c61571..199eeb4 100644 --- a/pom.xml +++ b/pom.xml @@ -4,13 +4,13 @@ org.springframework.boot spring-boot-starter-parent - 2.5.6 + 2.7.18 org.surfnet student-mobility-inteken-ontvanger-generiek - 0.2.16 + 0.2.17-SNAPSHOT inteken-ontvanger-generiek inteken-ontvanger-generiek @@ -32,21 +32,23 @@ com.nimbusds oauth2-oidc-sdk - 9.5 + 9.43.3 org.springframework.boot spring-boot-starter-web + com.h2database h2 + 1.4.200 runtime com.squareup.okhttp3 okhttp - 4.9.3 + 4.12.0 @@ -73,7 +75,7 @@ org.bouncycastle bcprov-jdk15on - 1.68 + 1.70 test diff --git a/src/test/java/generiek/GenericApplicationTest.java b/src/test/java/generiek/GenericApplicationTest.java index a6d098c..87fcca6 100644 --- a/src/test/java/generiek/GenericApplicationTest.java +++ b/src/test/java/generiek/GenericApplicationTest.java @@ -1,19 +1,23 @@ package generiek; import io.restassured.RestAssured; +import io.restassured.common.mapper.TypeRef; import io.restassured.http.ContentType; import org.junit.jupiter.api.Test; +import java.util.Map; + import static io.restassured.RestAssured.given; import static org.apache.http.HttpStatus.SC_OK; import static org.hamcrest.Matchers.equalTo; +import static org.junit.jupiter.api.Assertions.assertFalse; class GenericApplicationTest { @Test void main() { - GenericApplication.main(new String[]{"--server.port=8088"}); - RestAssured.port = 8088; + GenericApplication.main(new String[]{"--server.port=8082"}); + RestAssured.port = 8082; given() .when() .get("/internal/health") @@ -21,11 +25,12 @@ void main() { .statusCode(SC_OK) .body("status", equalTo("UP")); - given() + Map info = given() .accept(ContentType.JSON) .when() .get("/internal/info") - .then() - .body("build.artifact", equalTo("student-mobility-inteken-ontvanger-generiek")); + .as(new TypeRef>() { + }); + assertFalse(info.isEmpty()); } }