Skip to content

Commit 22218e7

Browse files
Address PR feedback: Use Spring Boot Docker Compose support correctly
Co-Authored-By: [email protected] <[email protected]>
1 parent f8fca44 commit 22218e7

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ target
99
.settings
1010
.factorypath
1111
.apt_generated
12-
.vscode/
12+
.vscode/
13+
HELP.md

doma-spring-boot-samples/doma-spring-boot-sample-docker-compose/compose.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ services:
22
postgres:
33
image: 'postgres:latest'
44
environment:
5-
- 'POSTGRES_DB=${POSTGRES_DB}'
6-
- 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD}'
7-
- 'POSTGRES_USER=${POSTGRES_USER}'
5+
- 'POSTGRES_DB=mydatabase'
6+
- 'POSTGRES_PASSWORD=secret'
7+
- 'POSTGRES_USER=myuser'
88
ports:
99
- '5432'

doma-spring-boot-samples/doma-spring-boot-sample-docker-compose/src/test/java/org/seasar/doma/boot/sample/ApplicationTest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66

77
@SpringBootTest
88
@TestPropertySource(properties = {
9-
"spring.datasource.url=jdbc:h2:mem:test;DB_CLOSE_DELAY=-1",
10-
"spring.datasource.username=sa",
11-
"spring.datasource.password=",
12-
"spring.datasource.driver-class-name=org.h2.Driver",
13-
"doma.dialect=H2"
9+
"spring.docker.compose.skip.in-tests=false",
10+
"doma.dialect=POSTGRES"
1411
})
1512
public class ApplicationTest {
1613

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Enable Docker Compose in tests
2+
spring.docker.compose.skip.in-tests=false
3+
doma.dialect=POSTGRES

0 commit comments

Comments
 (0)