New profile to skip Docker tests

This commit is contained in:
Robert McNees
2021-11-16 13:23:08 -05:00
parent 9efafe8d9c
commit e7e199dc0c
4 changed files with 19 additions and 0 deletions

13
pom.xml
View File

@@ -257,6 +257,19 @@
</plugins>
</build>
</profile>
<profile>
<id>withoutDockerTests</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>DockerRequired</excludedGroups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@@ -17,6 +17,7 @@
package org.springframework.cloud.gateway.config;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.junit.jupiter.Container;
@@ -35,6 +36,7 @@ import static org.assertj.core.api.Assertions.assertThat;
properties = "spring.cloud.gateway.redis-route-definition-repository.enabled=true")
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
@Testcontainers
@Tag("DockerRequired")
public class GatewayRedisRouteDefinitionRepositoryEnabledByPropertyTests {
@Container

View File

@@ -20,6 +20,7 @@ import java.util.UUID;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junitpioneer.jupiter.RetryingTest;
import org.testcontainers.containers.GenericContainer;
@@ -54,6 +55,7 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen
@SpringBootTest(webEnvironment = RANDOM_PORT)
@DirtiesContext
@Testcontainers
@Tag("DockerRequired")
public class RedisRateLimiterTests extends BaseWebClientTests {
@Container

View File

@@ -23,6 +23,7 @@ import java.util.function.Predicate;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.junit.jupiter.Container;
@@ -54,6 +55,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
@ActiveProfiles("redis-route-repository")
@Testcontainers
@Tag("DockerRequired")
public class RedisRouteDefinitionRepositoryTests {
@Container