fix tests
This commit is contained in:
@@ -215,6 +215,9 @@ NOTES*.md
|
|||||||
!platform/
|
!platform/
|
||||||
!core/
|
!core/
|
||||||
|
|
||||||
|
# Essential documentation for build
|
||||||
|
!docs/
|
||||||
|
|
||||||
# ===================================================================
|
# ===================================================================
|
||||||
# Final note: Each Dockerfile should copy only what it needs
|
# Final note: Each Dockerfile should copy only what it needs
|
||||||
# This .dockerignore provides a baseline for all builds
|
# This .dockerignore provides a baseline for all builds
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Entwicklungsumgebung spezifische Konfiguration
|
# Entwicklungsumgebung spezifische Konfiguration
|
||||||
|
|
||||||
# Server-Einstellungen
|
# Server-Einstellungen
|
||||||
server.port=8081
|
server.port=8080
|
||||||
|
|
||||||
# Datenbank-Einstellungen
|
# Datenbank-Einstellungen
|
||||||
database.host=localhost
|
database.host=localhost
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Produktionsumgebung spezifische Konfiguration
|
# Produktionsumgebung spezifische Konfiguration
|
||||||
|
|
||||||
# Server-Einstellungen
|
# Server-Einstellungen
|
||||||
server.port=8081
|
server.port=8080
|
||||||
server.workers=4
|
server.workers=4
|
||||||
server.cors.allowedOrigins=https://meldestelle.at,https://app.meldestelle.at
|
server.cors.allowedOrigins=https://meldestelle.at,https://app.meldestelle.at
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Staging-Umgebung spezifische Konfiguration
|
# Staging-Umgebung spezifische Konfiguration
|
||||||
|
|
||||||
# Server-Einstellungen
|
# Server-Einstellungen
|
||||||
server.port=8081
|
server.port=8080
|
||||||
server.workers=2
|
server.workers=2
|
||||||
server.cors.allowedOrigins=https://staging.meldestelle.at
|
server.cors.allowedOrigins=https://staging.meldestelle.at
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ app.version=1.0.0
|
|||||||
app.description=Pferdesport Meldestelle System
|
app.description=Pferdesport Meldestelle System
|
||||||
|
|
||||||
# Server-Einstellungen
|
# Server-Einstellungen
|
||||||
server.port=8081
|
server.port=8080
|
||||||
server.host=0.0.0.0
|
server.host=0.0.0.0
|
||||||
server.workers=4
|
server.workers=4
|
||||||
server.cors.enabled=true
|
server.cors.enabled=true
|
||||||
|
|||||||
@@ -103,6 +103,38 @@ services:
|
|||||||
start_period: 15s
|
start_period: 15s
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
# ===================================================================
|
||||||
|
# API Gateway
|
||||||
|
# ===================================================================
|
||||||
|
api-gateway:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: infrastructure/gateway/Dockerfile
|
||||||
|
container_name: meldestelle-api-gateway
|
||||||
|
environment:
|
||||||
|
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-dev}
|
||||||
|
CONSUL_HOST: consul
|
||||||
|
CONSUL_PORT: 8500
|
||||||
|
CONSUL_ENABLED: true
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
depends_on:
|
||||||
|
consul:
|
||||||
|
condition: service_healthy
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
networks:
|
||||||
|
- meldestelle-network
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "curl", "--fail", "http://localhost:8080/actuator/health" ]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
start_period: 30s
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
# ===================================================================
|
# ===================================================================
|
||||||
# Volumes
|
# Volumes
|
||||||
# ===================================================================
|
# ===================================================================
|
||||||
|
|||||||
@@ -18,6 +18,15 @@ COPY core core/
|
|||||||
# Infrastructure Module kopieren (für Dependencies)
|
# Infrastructure Module kopieren (für Dependencies)
|
||||||
COPY infrastructure infrastructure/
|
COPY infrastructure infrastructure/
|
||||||
|
|
||||||
|
# Client Module kopieren (für Dependencies)
|
||||||
|
COPY client client/
|
||||||
|
|
||||||
|
# Documentation Module kopieren (für Dependencies)
|
||||||
|
COPY docs docs/
|
||||||
|
|
||||||
|
# Temporary Module kopieren (für Dependencies)
|
||||||
|
COPY temp temp/
|
||||||
|
|
||||||
# Gateway Module bauen
|
# Gateway Module bauen
|
||||||
RUN ./gradlew :infrastructure:gateway:bootJar -x test --no-daemon
|
RUN ./gradlew :infrastructure:gateway:bootJar -x test --no-daemon
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,15 @@ tasks.getByName("bootJar") {
|
|||||||
enabled = false
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Deaktiviert bootRun und bootTestRun für dieses Bibliotheks-Modul, da es keine ausführbare Anwendung ist.
|
||||||
|
tasks.getByName("bootRun") {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.getByName("bootTestRun") {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Stellt sicher, dass alle Versionen aus der zentralen BOM kommen.
|
// Stellt sicher, dass alle Versionen aus der zentralen BOM kommen.
|
||||||
implementation(platform(projects.platform.platformBom))
|
implementation(platform(projects.platform.platformBom))
|
||||||
|
|||||||
@@ -12,6 +12,15 @@ tasks.getByName("bootJar") {
|
|||||||
enabled = false
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Deaktiviert bootRun und bootTestRun für dieses Bibliotheks-Modul, da es keine ausführbare Anwendung ist.
|
||||||
|
tasks.getByName("bootRun") {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.getByName("bootTestRun") {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Stellt sicher, dass alle Versionen aus der zentralen BOM kommen.
|
// Stellt sicher, dass alle Versionen aus der zentralen BOM kommen.
|
||||||
api(platform(projects.platform.platformBom))
|
api(platform(projects.platform.platformBom))
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ management.tracing.enabled=false
|
|||||||
logging.level.zipkin2=INFO
|
logging.level.zipkin2=INFO
|
||||||
logging.level.org.springframework.boot.autoconfigure=INFO
|
logging.level.org.springframework.boot.autoconfigure=INFO
|
||||||
|
|
||||||
|
# --- Spring Boot Auto-Configuration ---
|
||||||
|
# Deaktiviert Armeria Auto-Configuration, da Zipkin seinen eigenen Server verwendet
|
||||||
|
spring.autoconfigure.exclude=com.linecorp.armeria.spring.ArmeriaAutoConfiguration
|
||||||
|
|
||||||
# Folgende Properties wurden entfernt, da sie den Standardwerten in Zipkin 3.x entsprechen:
|
# Folgende Properties wurden entfernt, da sie den Standardwerten in Zipkin 3.x entsprechen:
|
||||||
# zipkin.ui.enabled=true (UI ist standardmäßig aktiv)
|
# zipkin.ui.enabled=true (UI ist standardmäßig aktiv)
|
||||||
# server.servlet.context-path=/ (Standard-Context-Path ist root)
|
# server.servlet.context-path=/ (Standard-Context-Path ist root)
|
||||||
|
|||||||
+6
-8
@@ -11,20 +11,18 @@ import org.springframework.context.ApplicationContext
|
|||||||
* Testet, ob der Spring Application Context für den Monitoring-Server
|
* Testet, ob der Spring Application Context für den Monitoring-Server
|
||||||
* erfolgreich geladen werden kann.
|
* erfolgreich geladen werden kann.
|
||||||
*
|
*
|
||||||
* DEAKTIVIERT: Spring context loading fails due to Zipkin/Armeria auto-configuration issues.
|
* Mit der Armeria Auto-Configuration Ausschluss-Konfiguration sollte der Context erfolgreich laden.
|
||||||
* @SpringBootTest annotation removed to prevent context loading during test class initialization.
|
* Verwendet RANDOM_PORT um Konflikte mit bootRun-Tasks zu vermeiden.
|
||||||
*/
|
*/
|
||||||
@Disabled("Spring context loading fails due to Zipkin/Armeria auto-configuration issues - needs investigation")
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||||
class MonitoringServerApplicationTest {
|
class MonitoringServerApplicationTest {
|
||||||
|
|
||||||
// @Autowired - Removed to prevent Spring dependency injection
|
@Autowired
|
||||||
// private lateinit var context: ApplicationContext
|
private lateinit var context: ApplicationContext
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Disabled("Spring context loading fails due to Zipkin/Armeria auto-configuration issues - needs investigation")
|
|
||||||
fun `context loads successfully`() {
|
fun `context loads successfully`() {
|
||||||
// Bestätigt, dass der gesamte Server-Kontext erfolgreich gestartet wurde.
|
// Bestätigt, dass der gesamte Server-Kontext erfolgreich gestartet wurde.
|
||||||
// Test disabled due to Spring context loading issues
|
assertThat(context).isNotNull()
|
||||||
// assertThat(context).isNotNull()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ spring:
|
|||||||
health-check-interval: 10s
|
health-check-interval: 10s
|
||||||
|
|
||||||
server:
|
server:
|
||||||
port: 8082
|
port: 0
|
||||||
|
|
||||||
management:
|
management:
|
||||||
endpoints:
|
endpoints:
|
||||||
|
|||||||
Reference in New Issue
Block a user