Skip to content

Commit

Permalink
gematik#57 dockerize Testsuite for local testtreiber development
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-frei committed Feb 13, 2025
1 parent 24f1c77 commit 5c1880c
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 15 deletions.
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
FROM maven:3.6.3-openjdk-17-slim

#FROM maven:3.9.9-eclipse-temurin-23-alpine
WORKDIR /testsuite
COPY --chown=user:group . /testsuite
COPY entrypoint.sh /usr/local/bin/
RUN mvn clean compile test-compile

WORKDIR /testsuite

RUN ["chmod", "+x", "/usr/local/bin/entrypoint.sh"]
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
25 changes: 25 additions & 0 deletions kosyma-readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# KoSyMa Developer Manual

## Current situation
Gematik only supports maven 3.6.3 with jdk17. Any higher version leads to compilation errors.
It was forecasted to be upgraded to maven 3.8.6 end of 2025 (whereas the latest maven version today, 12. Feb 2024 is already 3.9.9)

## Running the testsuite
To avoid the maven problem, we can run the testsuite from Docker.

```shell
# open terminal 1
cd ti-messenger-client/testtreiber
npm run testtreiber
# 🚀 Server running at: http://localhost:3010
# 🚀 Server running at: http://localhost:3000
# 🚀 Server running at: http://localhost:3030
# 🚀 Server running at: http://localhost:3020

# open terminal 2
cd TI-Messenger-Testsuite
docker build -f ./Dockerfile -t tiger .
docker run -it --network=host tiger /bin/bash
# inside the docker container make sure you are in /testsuite
mvn verify
```
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
<target>${java.version}</target>
<debug>true</debug>
<compileSourceRoots>
<compileSourceRoot>src/main/java/**</compileSourceRoot>
<compileSourceRoot>src/generated/java/**</compileSourceRoot>
<compileSourceRoot>src/main/java</compileSourceRoot>
<compileSourceRoot>target/generated-sources/openapi</compileSourceRoot>
<compileSourceRoot>${project.build.directory}/generated-test-sources/tigerbdd/de/gematik/tim/test/drivers</compileSourceRoot>
</compileSourceRoots>
</configuration>
Expand Down
8 changes: 4 additions & 4 deletions src/test/resources/combine_items.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"value": "testdriverApi_A_LINUX_Client",
"url": "http://localhost:3000",
"url": "http://host.docker.internal:3000",
"tags": [
"client",
"canSendMessages",
Expand All @@ -14,7 +14,7 @@
},
{
"value": "testdriverApi_B_LINUX_Client",
"url": "http://localhost:3010",
"url": "http://host.docker.internal:3010",
"tags": [
"client",
"canSendMessages",
Expand All @@ -27,7 +27,7 @@
},
{
"value": "testdriverApi_C_LINUX_Client",
"url": "http://localhost:3020",
"url": "http://host.docker.internal:3020",
"tags": [
"client",
"canSendMessages",
Expand All @@ -41,7 +41,7 @@
},
{
"value": "testdriverApi_D_LINUX_Orgadmin",
"url": "http://localhost:3030",
"url": "http://host.docker.internal:3030",
"tags": [
"orgAdmin"
],
Expand Down
8 changes: 4 additions & 4 deletions tiger.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
tigerProxy:
proxyRoutes:
- from: http://testdriverApi_A_LINUX_Client
to: http://localhost:3000
to: http://host.docker.internal:3000
- from: http://testdriverApi_B_LINUX_Client
to: http://localhost:3010
to: http://host.docker.internal:3010
- from: http://testdriverApi_C_LINUX_Client
to: http://localhost:3020
to: http://host.docker.internal:3020
- from: http://testdriverApi_D_LINUX_Orgadmin
to: http://localhost:3030
to: http://host.docker.internal:3030

0 comments on commit 5c1880c

Please sign in to comment.