# Test Configuration for TestContainers-based Integration Tests
# DataSource is automatically configured by @ServiceConnection from TestContainers

spring.application.name=lcc

# Disable env.properties import for tests (TestContainers provides DB config)
# spring.config.import=classpath:env.properties

# Disable schema.sql - we use Flyway migrations instead
spring.sql.init.mode=never

# Flyway configuration - migrations will run automatically
spring.flyway.enabled=true
spring.flyway.baseline-on-migrate=true
spring.flyway.clean-disabled=false
# Note: spring.flyway.locations is set in application-mysql.properties or application-mssql.properties

# Security configuration for E2E tests
# Note: SecurityAutoConfiguration is NOT excluded - we use devSecurityFilterChain with @Profile("test")
# which permits all requests but still requires HttpSecurity bean
spring.autoconfigure.exclude=\
  org.springframework.boot.autoconfigure.security.oauth2.client.servlet.OAuth2ClientAutoConfiguration,\
  org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2ResourceServerAutoConfiguration,\
  org.springframework.boot.autoconfigure.webservices.WebServicesAutoConfiguration,\
  org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration

# Disable Azure AD for tests
spring.cloud.azure.active-directory.enabled=false

# Azure Maps API - dummy values for E2E tests (real API not called in tests)
azure.maps.subscription.key=test-dummy-key-not-used
azure.maps.api.url=https://atlas.microsoft.com

# JWT configuration for tests
jwt.secret=test-secret-key-for-e2e-tests-must-be-long-enough
jwt.issuer=test-issuer

# LCC configuration for tests
lcc.allowed_cors=*
lcc.allowed_oauth_token_cors=*
lcc.auth.claim.email=email
lcc.auth.claim.firstname=given_name
lcc.auth.claim.lastname=family_name
lcc.auth.claim.workday=workday_id
lcc.auth.claim.ignore.workday=false
lcc.auth.identify.by=workday
lcc.bulk.sheet_password=test-password
lcc.help.static=

# Disable async processing in tests (EUTaxationApiService uses @Async)
spring.task.execution.pool.core-size=0
spring.task.scheduling.enabled=false

# Logging
logging.level.org.flywaydb=INFO
logging.level.org.testcontainers=INFO
logging.level.de.avatic.lcc=DEBUG
#logging.level.org.springframework.jdbc=DEBUG



