Skip to content

Commit

Permalink
New SNAPSHOT dev cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Apr 4, 2024
1 parent 781e843 commit 65ef14d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ TODO.txt
database/
docu
OldEnrollmentEndpoint.java
dependency.tree
dependency*.tree
12 changes: 7 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.6</version>
<version>2.7.18</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
<groupId>org.surfnet</groupId>
<artifactId>student-mobility-inteken-ontvanger-generiek</artifactId>
<version>0.2.16</version>
<version>0.2.17-SNAPSHOT</version>
<name>inteken-ontvanger-generiek</name>
<description>inteken-ontvanger-generiek</description>
<properties>
Expand All @@ -32,21 +32,23 @@
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>oauth2-oidc-sdk</artifactId>
<version>9.5</version>
<version>9.43.3</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Upgrade to version 2 will break the current migrations. You can't change them as Flyway will complain. -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.200</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.9.3</version>
<version>4.12.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
<dependency>
Expand All @@ -73,7 +75,7 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.68</version>
<version>1.70</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
15 changes: 10 additions & 5 deletions src/test/java/generiek/GenericApplicationTest.java
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
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")
.then()
.statusCode(SC_OK)
.body("status", equalTo("UP"));

given()
Map<String, Object> info = given()
.accept(ContentType.JSON)
.when()
.get("/internal/info")
.then()
.body("build.artifact", equalTo("student-mobility-inteken-ontvanger-generiek"));
.as(new TypeRef<Map<String, Object>>() {
});
assertFalse(info.isEmpty());
}
}

0 comments on commit 65ef14d

Please sign in to comment.