# Test 환경 설정 - 로컬 Docker PostgreSQL + PostGIS 사용
# G2F Layer Edit API 테스트를 위한 설정

# 기본 프로파일 설정
spring.profiles.active=test
spring.main.allow-bean-definition-overriding=true

# PostgreSQL 16 + PostGIS 3.4 연결 정보 (로컬 Docker 환경)
# 테스트에서는 P6Spy 없이 직접 연결
globals.postgres.driverClassName=org.postgresql.Driver
globals.postgres.jdbcUrl=jdbc:postgresql://127.0.0.1:5432/incheon
globals.postgres.username=incheon
globals.postgres.password=incheon
globals.postgres.maximumPoolSize=5
globals.postgres.minimumIdle=1
globals.postgres.connectionTimeout=30000
globals.postgres.idleTimeout=300000
globals.postgres.maxLifetime=900000
globals.postgres.leakDetectionThreshold=60000
globals.postgres.validationTimeout=5000

# 외부 DB (테스트용)
globals.external.postgres.driverClassName=org.postgresql.Driver
globals.external.postgres.jdbcUrl=jdbc:postgresql://127.0.0.1:15432/incheon
globals.external.postgres.username=incheon
globals.external.postgres.password=incheon
globals.external.postgres.maximumPoolSize=3
globals.external.postgres.minimumIdle=1
globals.external.postgres.connectionTimeout=30000
globals.external.postgres.idleTimeout=300000
globals.external.postgres.maxLifetime=900000
globals.external.postgres.leakDetectionThreshold=60000
globals.external.postgres.validationTimeout=5000

# DB 타입 설정
Globals.DbType=postgres

# MyBatis 설정
mybatis.configuration.log-impl=org.apache.ibatis.logging.slf4j.Slf4jImpl
mybatis.configuration.log-prefix=[TEST-SQL]
mybatis.configuration.multiple-result-sets-enabled=true

# 로깅 설정 (테스트용)
logging.level.incheon.g2f=DEBUG
logging.level.incheon.g2f.mapper=TRACE
logging.level.incheon.tmp.crud=DEBUG
logging.level.org.mybatis=DEBUG
logging.level.org.springframework.jdbc=DEBUG
logging.level.com.zaxxer.hikari=INFO

# 트랜잭션 로그
logging.level.org.springframework.transaction=DEBUG

# 웹 관련 설정 (컨트롤러 테스트용)
server.servlet.context-path=/
spring.mvc.pathmatch.matching-strategy=ant_path_matcher

# JSON 설정
spring.jackson.property-naming-strategy=SNAKE_CASE
spring.jackson.default-property-inclusion=NON_NULL

# 파일 설정 (테스트용)
Globals.fileStorePath=./test-files
Globals.fileUpload.maxUploadSize=10000000
Globals.fileUpload.maxInMemorySize=10000000

# Page Config
Globals.pageUnit=10
Globals.pageSize=10

# 테스트에서는 캐시 비활성화
spring.resources.cache.period=0
spring.thymeleaf.cache=false

# H2 콘솔 비활성화 (PostgreSQL 사용)
spring.h2.console.enabled=false

# Spring Security 테스트 설정 - 모든 요청 허용
spring.security.enabled=false
management.security.enabled=false