Skip to content

Commit

Permalink
Merge branch 'main' into feature/i-dont-know-what-is-this
Browse files Browse the repository at this point in the history
  • Loading branch information
GiaBaorr authored Feb 15, 2025
2 parents 2a05631 + 8e3e609 commit 2d3b5ce
Show file tree
Hide file tree
Showing 10 changed files with 431 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Build with Gradle
timeout-minutes: 15
run: |
./gradlew build -x test --scan
./gradlew build --scan
working-directory: ${{ matrix.module }}

build-frontend:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@ public abstract class TestcontainersConfigs {
static void beforeAll() {
postgres.start();
idP.withExposedPorts(8180)
.waitingFor(Wait.forHttp("/realms/greenbuildings/.well-known/openid-configuration")
.forStatusCode(200)
.withReadTimeout(java.time.Duration.ofMinutes(5))
.withStartupTimeout(java.time.Duration.ofMinutes(5))
)
.start();
.withCommand("start-dev --http-port 8180")
.waitingFor(Wait.forHttp("/realms/greenbuildings/.well-known/openid-configuration"))
.start();
}

@AfterAll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void getEnterpriseBuildings_withValidToken_returns200() {
.contentType(ContentType.JSON)
.body(new SearchCriteriaDTO<Void>(null, null, null))
.when()
.post("/buildings/search")
.post("/api/buildings/search")
.then()
.statusCode(200);
}
Expand All @@ -42,7 +42,7 @@ void getEnterpriseBuildings_withInvalidToken_returns401() {
.contentType(ContentType.JSON)
.body(new SearchCriteriaDTO<Void>(null, null, null))
.when()
.post("/buildings/search")
.post("/api/buildings/search")
.then()
.statusCode(401);
}
Expand All @@ -59,7 +59,7 @@ void createBuilding_withValidToken_returns201() {
.contentType(ContentType.JSON)
.body(building)
.when()
.post("/buildings")
.post("/api/buildings")
.then()
.statusCode(201);
}
Expand All @@ -71,7 +71,7 @@ void createBuilding_withMissingFields_returns400() {
.contentType(ContentType.JSON)
.body(BuildingDTO.builder().build())
.when()
.post("/buildings")
.post("/api/buildings")
.then()
.statusCode(400);
}
Expand All @@ -83,7 +83,7 @@ void createBuilding_withInvalidToken_returns401() {
.contentType(ContentType.JSON)
.body(BuildingDTO.builder().build())
.when()
.post("/buildings")
.post("/api/buildings")
.then()
.statusCode(401);
}
Expand Down
4 changes: 2 additions & 2 deletions sep490-infrastructure/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
sep490_instance:
sep490_databases:
image: postgres:16.4
container_name: sep490_instance
container_name: sep490_databases
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM quay.io/keycloak/keycloak:24.0.5

USER 0
COPY ./greenbuildings.json /tmp
COPY ./target/greenbuildings-testcontainer-plugin.jar /opt/keycloak/providers
RUN /opt/keycloak/bin/kc.sh build --health-enabled=true
RUN /opt/keycloak/bin/kc.sh import --file /tmp/greenbuildings.json
10 changes: 10 additions & 0 deletions sep490-infrastructure/keycloak-testcontainer-provider/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
podman manifest rm thongdh3401/keycloak:24.0.5

# First, initialise the manifest
podman manifest create thongdh3401/keycloak:24.0.5

# Build the image attaching them to the manifest
podman build --platform linux/amd64,linux/arm64 --manifest thongdh3401/keycloak:24.0.5 .

# Finally publish the manifest
podman manifest push thongdh3401/keycloak:24.0.5
Loading

0 comments on commit 2d3b5ce

Please sign in to comment.