fix(build): switch from uber-jar to fast-jar for Docker compatibility

- Change quarkus.package.type from uber-jar to fast-jar
- Add EventShare entity and migration for share tracking
- Add establishment capacity field
- Improve event and establishment services
- Add comprehensive tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
dahoud
2026-01-31 20:27:27 +00:00
parent 9dc9ca591c
commit 0240442671
19 changed files with 574 additions and 62 deletions

View File

@@ -0,0 +1,51 @@
package com.lions.dev.resource;
import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import java.util.UUID;
import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.*;
@QuarkusTest
class EventsResourceTest {
@Test
@DisplayName("POST /events/{id}/share sans événement existant retourne 404")
void shareEvent_eventNotFound_returns404() {
String eventId = UUID.randomUUID().toString();
String userId = UUID.randomUUID().toString();
given()
.queryParam("userId", userId)
.when()
.post("/events/" + eventId + "/share")
.then()
.statusCode(404);
}
@Test
@DisplayName("GET /events/share-link avec id invalide retourne 404")
void getShareLink_eventNotFound_returns404() {
String eventId = UUID.randomUUID().toString();
given()
.when()
.get("/events/" + eventId + "/share-link")
.then()
.statusCode(404);
}
@Test
@DisplayName("GET /events retourne une liste (200)")
void getEvents_returnsOk() {
given()
.when()
.get("/events")
.then()
.statusCode(200)
.body(anyOf(is("[]"), startsWith("[")));
}
}