mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-04-24 19:32:48 +00:00
Docker-based integration tests don't work in native for now
This commit is contained in:
parent
c231682c2d
commit
b4efc934b2
2 changed files with 4 additions and 0 deletions
|
@ -19,6 +19,7 @@ package org.springframework.samples.petclinic;
|
|||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.DisabledInNativeImage;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||
|
@ -38,6 +39,7 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
|||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
|
||||
@ActiveProfiles("mysql")
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
@DisabledInNativeImage
|
||||
class MySqlIntegrationTests {
|
||||
|
||||
@ServiceConnection
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.apache.commons.logging.Log;
|
|||
import org.apache.commons.logging.LogFactory;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.DisabledInNativeImage;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.context.event.ApplicationPreparedEvent;
|
||||
|
@ -49,6 +50,7 @@ import org.testcontainers.DockerClientFactory;
|
|||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = { "spring.docker.compose.skip.in-tests=false", //
|
||||
"spring.docker.compose.profiles.active=postgres" })
|
||||
@ActiveProfiles("postgres")
|
||||
@DisabledInNativeImage
|
||||
public class PostgresIntegrationTests {
|
||||
|
||||
@LocalServerPort
|
||||
|
|
Loading…
Reference in a new issue