Created
April 4, 2025 06:58
-
-
Save pikolinianita/0718608f53a0e92dc541048b0e59e72e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//Klasa z konfiguracjami Test-Kontenerów | |
@TestConfiguration(proxyBeanMethods = false) | |
class TestContainerConfiguration { | |
@Bean | |
@ServiceConnection | |
PostgreSQLContainer<?> postgresContainer() { | |
return new PostgreSQLContainer<>(DockerImageName.parse("postgres:17")); | |
} | |
} | |
//Uruchomienie aplikacji z Test-kontenerami | |
public class TestCoursesRun { | |
public static void main(String[] args) { | |
SpringApplication.from(CoursesPlatformApplication::main) | |
.with(TestContainerConfiguration.class) | |
.run(args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment