# =============================================================================
# CONFIGURAÇÃO DE TESTES - GeoSegBar
# =============================================================================
# Este arquivo contém as configurações específicas para o ambiente de testes.
# As configurações de produção não devem ser usadas durante os testes.
# =============================================================================

# -----------------------------------------------------------------------------
# SPRING
# -----------------------------------------------------------------------------
spring.application.name=geosegbar-test
spring.profiles.active=test

# -----------------------------------------------------------------------------
# DATASOURCE - PostgreSQL (Testcontainers)
# -----------------------------------------------------------------------------
# As propriedades de conexão são configuradas dinamicamente pelo BaseIntegrationTest
# através do @DynamicPropertySource
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect

# -----------------------------------------------------------------------------
# JPA / HIBERNATE
# -----------------------------------------------------------------------------
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.show-sql=false
spring.jpa.properties.hibernate.format_sql=false
spring.jpa.properties.hibernate.use_sql_comments=false
spring.jpa.properties.hibernate.jdbc.batch_size=20
spring.jpa.properties.hibernate.order_inserts=true
spring.jpa.properties.hibernate.order_updates=true
spring.jpa.open-in-view=falsexs

# -----------------------------------------------------------------------------
# LOGGING
# -----------------------------------------------------------------------------
logging.level.root=INFO
logging.level.com.geosegbar=DEBUG
logging.level.org.springframework.web=INFO
logging.level.org.hibernate.SQL=INFO
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=INFO
logging.level.org.testcontainers=INFO
logging.level.com.github.dockerjava=WARN

# -----------------------------------------------------------------------------
# ACTUATOR
# -----------------------------------------------------------------------------
management.endpoints.enabled-by-default=false
management.endpoint.health.enabled=true
management.endpoint.info.enabled=true

# -----------------------------------------------------------------------------
# SECURITY
# -----------------------------------------------------------------------------
# Configurações JWT para testes
jwt.secret=test-secret-key-for-testing-purposes-only-do-not-use-in-production
jwt.expiration=3600000

# -----------------------------------------------------------------------------
# EMAIL (Desabilitado para testes)
# -----------------------------------------------------------------------------
spring.mail.host=localhost
spring.mail.port=1025
spring.mail.username=test
spring.mail.password=test
spring.mail.properties.mail.smtp.auth=false
spring.mail.properties.mail.smtp.starttls.enable=false

# -----------------------------------------------------------------------------
# FILE UPLOAD (Diretório temporário para testes)
# -----------------------------------------------------------------------------
file.upload.dir=/tmp/geosegbar-test/uploads
file.upload.max-size=10MB

# -----------------------------------------------------------------------------
# WIREMOCK (Para testes de APIs externas)
# -----------------------------------------------------------------------------
wiremock.server.port=8089
wiremock.server.files=src/test/resources/wiremock

# -----------------------------------------------------------------------------
# JACKSON
# -----------------------------------------------------------------------------
spring.jackson.serialization.write-dates-as-timestamps=false
spring.jackson.serialization.fail-on-empty-beans=false

# -----------------------------------------------------------------------------
# SPRING BOOT TEST
# -----------------------------------------------------------------------------
spring.test.mockmvc.print=false
spring.main.lazy-initialization=false
