-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...test/java/com/dictionary/learning/platform/DictionaryLearningPlatformTestApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.dictionary.learning.platform; | ||
|
||
import com.dictionary.learning.platform.config.ContainersConfig; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class DictionaryLearningPlatformTestApplication { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.from(DictionaryLearningPlatformApplication::main) | ||
.with(ContainersConfig.class) | ||
.run(args); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
app/src/test/java/com/dictionary/learning/platform/config/ContainersConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.dictionary.learning.platform.config; | ||
|
||
import org.springframework.boot.devtools.restart.RestartScope; | ||
import org.springframework.boot.test.context.TestConfiguration; | ||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection; | ||
import org.springframework.context.annotation.Bean; | ||
import org.testcontainers.containers.PostgreSQLContainer; | ||
|
||
@TestConfiguration(proxyBeanMethods = false) | ||
public class ContainersConfig { | ||
|
||
@Bean | ||
@ServiceConnection | ||
@RestartScope | ||
public PostgreSQLContainer<?> postgresSqlContainer() { | ||
return new PostgreSQLContainer<>("postgres:16.4"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters