feat(horses-service): remove integration tests and obsolete configurations
- Deleted outdated integration test classes (`HorseServiceIntegrationTest`, `TransactionalContextTest`, and others) and test resources (`logback-test.xml`). - Removed obsolete Gradle dependencies related to these tests and revised project module references. - Simplified `DomPferd` domain model with minor refactorings for serialization and validation. Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
+3
-2
@@ -3,8 +3,8 @@ package at.mocode.persons.service.config
|
||||
import at.mocode.persons.infrastructure.persistence.ZnsPersonTable
|
||||
import jakarta.annotation.PostConstruct
|
||||
import org.jetbrains.exposed.v1.jdbc.Database
|
||||
import org.jetbrains.exposed.v1.jdbc.SchemaUtils
|
||||
import org.jetbrains.exposed.v1.jdbc.transactions.transaction
|
||||
import org.jetbrains.exposed.v1.migration.jdbc.MigrationUtils
|
||||
import org.slf4j.LoggerFactory
|
||||
import org.springframework.beans.factory.annotation.Value
|
||||
import org.springframework.context.annotation.Configuration
|
||||
@@ -24,7 +24,8 @@ class PersonsDatabaseConfiguration(
|
||||
log.info("Initialisiere Datenbank-Schema für Persons-Service...")
|
||||
Database.connect(jdbcUrl, user = username, password = password)
|
||||
transaction {
|
||||
SchemaUtils.createMissingTablesAndColumns(ZnsPersonTable)
|
||||
val statements = MigrationUtils.statementsRequiredForDatabaseMigration(ZnsPersonTable)
|
||||
statements.forEach { exec(it) }
|
||||
log.info("Datenbank-Schema erfolgreich initialisiert")
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,9 +1,9 @@
|
||||
package at.mocode.persons.service.dev
|
||||
|
||||
import at.mocode.persons.infrastructure.persistence.ZnsPersonTable
|
||||
import org.jetbrains.exposed.v1.jdbc.SchemaUtils
|
||||
import org.jetbrains.exposed.v1.jdbc.batchInsert
|
||||
import org.jetbrains.exposed.v1.jdbc.transactions.transaction
|
||||
import org.jetbrains.exposed.v1.migration.jdbc.MigrationUtils
|
||||
import org.slf4j.LoggerFactory
|
||||
import org.springframework.beans.factory.annotation.Value
|
||||
import org.springframework.boot.CommandLineRunner
|
||||
@@ -36,7 +36,8 @@ class ZnsPersonSeeder(
|
||||
}
|
||||
log.info("Starte ZNS-Personen-Import aus: {}", dir.absolutePath)
|
||||
transaction {
|
||||
SchemaUtils.createMissingTablesAndColumns(ZnsPersonTable)
|
||||
val statements = MigrationUtils.statementsRequiredForDatabaseMigration(ZnsPersonTable)
|
||||
statements.forEach { exec(it) }
|
||||
}
|
||||
seedPersons(dir)
|
||||
log.info("ZNS-Personen-Import abgeschlossen.")
|
||||
|
||||
Reference in New Issue
Block a user