BAEL-5589 - Skipping tests with docker from pipeline.

This commit is contained in:
Christian GERMAN 2022-07-28 14:30:02 +02:00
parent 9fa417faf5
commit 1eeb2721e7
2 changed files with 8 additions and 4 deletions

View File

@ -26,11 +26,11 @@ import org.springframework.web.reactive.function.client.WebClient;
import dasniko.testcontainers.keycloak.KeycloakContainer; import dasniko.testcontainers.keycloak.KeycloakContainer;
import io.restassured.RestAssured; import io.restassured.RestAssured;
@ContextConfiguration(initializers = { IntegrationTest.Initializer.class }) @ContextConfiguration(initializers = { KeycloakTestContainers.Initializer.class })
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public abstract class IntegrationTest { public abstract class KeycloakTestContainers {
private static final Logger LOGGER = LoggerFactory.getLogger(IntegrationTest.class.getName()); private static final Logger LOGGER = LoggerFactory.getLogger(KeycloakTestContainers.class.getName());
@LocalServerPort @LocalServerPort
private int port; private int port;

View File

@ -5,7 +5,11 @@ import static org.hamcrest.Matchers.equalTo;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
class UserControllerIntegrationTest extends IntegrationTest { /**
* Requires Docker running on the machine to run without errors
* Therefore, skipped from pipeline
*/
class UserControllerManualTest extends KeycloakTestContainers {
@Test @Test
void givenAuthenticatedUser_whenGetMe_shouldReturnMyInfo() { void givenAuthenticatedUser_whenGetMe_shouldReturnMyInfo() {