diff --git a/build.gradle b/build.gradle index d98373b..a5bf250 100644 --- a/build.gradle +++ b/build.gradle @@ -57,6 +57,7 @@ dependencies { runtimeOnly 'org.flywaydb:flyway-database-postgresql' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testImplementation 'com.h2database:h2:2.3.230' // Replace with the latest version testImplementation 'org.junit.jupiter:junit-jupiter-api' } diff --git a/src/test/resources/application.yml b/src/test/resources/application.yml new file mode 100644 index 0000000..f96f6c5 --- /dev/null +++ b/src/test/resources/application.yml @@ -0,0 +1,54 @@ +spring: + application: + name: statistics_ms + + # JPA configuration + jpa.: + hibernate: + ddl-auto: none + properties: + hibernate: + format_sql: true + show-sql: false + + datasource: + url: jdbc:h2:mem:testdb + driverClassName: org.h2.Driver + username: sa + password: password + # driver-class-name: org.postgresql.Driver + h2: + console: + enabled: true + + flyway: + enabled: true + baselineOnMigrate: true + locations: classpath:db/migration + url: ${spring.datasource.url} + schemas: qms_report + user: ${spring.datasource.username} + password: ${spring.datasource.password} + +management: + endpoints: + web: + exposure: + include: health + base-path: /v1 + path-mapping: + health: /stats/actuator + endpoint: + health: + show-details: never + enabled: true + health: + mail: + enabled: false + +server: + port: 80 + +logging: + level: + javax.net.ssl: DEBUG \ No newline at end of file