fix tests

This commit is contained in:
stefan
2025-09-05 13:52:45 +02:00
parent f160dd2988
commit 4af276e67a
12 changed files with 77 additions and 13 deletions
+9
View File
@@ -18,6 +18,15 @@ COPY core core/
# Infrastructure Module kopieren (für Dependencies)
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
RUN ./gradlew :infrastructure:gateway:bootJar -x test --no-daemon
@@ -12,6 +12,15 @@ tasks.getByName("bootJar") {
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 {
// Stellt sicher, dass alle Versionen aus der zentralen BOM kommen.
implementation(platform(projects.platform.platformBom))
@@ -12,6 +12,15 @@ tasks.getByName("bootJar") {
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 {
// Stellt sicher, dass alle Versionen aus der zentralen BOM kommen.
api(platform(projects.platform.platformBom))
@@ -23,6 +23,10 @@ management.tracing.enabled=false
logging.level.zipkin2=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:
# zipkin.ui.enabled=true (UI ist standardmäßig aktiv)
# server.servlet.context-path=/ (Standard-Context-Path ist root)
@@ -11,20 +11,18 @@ import org.springframework.context.ApplicationContext
* Testet, ob der Spring Application Context für den Monitoring-Server
* erfolgreich geladen werden kann.
*
* DEAKTIVIERT: Spring context loading fails due to Zipkin/Armeria auto-configuration issues.
* @SpringBootTest annotation removed to prevent context loading during test class initialization.
* Mit der Armeria Auto-Configuration Ausschluss-Konfiguration sollte der Context erfolgreich laden.
* 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 {
// @Autowired - Removed to prevent Spring dependency injection
// private lateinit var context: ApplicationContext
@Autowired
private lateinit var context: ApplicationContext
@Test
@Disabled("Spring context loading fails due to Zipkin/Armeria auto-configuration issues - needs investigation")
fun `context loads successfully`() {
// Bestätigt, dass der gesamte Server-Kontext erfolgreich gestartet wurde.
// Test disabled due to Spring context loading issues
// assertThat(context).isNotNull()
assertThat(context).isNotNull()
}
}