From efd9a398a13c04dd496f0bef00021304c846e7de Mon Sep 17 00:00:00 2001 From: Haroon Khan Date: Thu, 12 May 2022 19:36:01 +0100 Subject: [PATCH] [JAVA-11979] Rename Keycloak server Integration test to Live test --- ...rationTest.java => KeycloakSoapLiveTest.java} | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) rename spring-boot-modules/spring-boot-keycloak/src/test/java/com/baeldung/keycloaksoap/{KeycloakSoapIntegrationTest.java => KeycloakSoapLiveTest.java} (96%) diff --git a/spring-boot-modules/spring-boot-keycloak/src/test/java/com/baeldung/keycloaksoap/KeycloakSoapIntegrationTest.java b/spring-boot-modules/spring-boot-keycloak/src/test/java/com/baeldung/keycloaksoap/KeycloakSoapLiveTest.java similarity index 96% rename from spring-boot-modules/spring-boot-keycloak/src/test/java/com/baeldung/keycloaksoap/KeycloakSoapIntegrationTest.java rename to spring-boot-modules/spring-boot-keycloak/src/test/java/com/baeldung/keycloaksoap/KeycloakSoapLiveTest.java index e0de897044..0327915399 100644 --- a/spring-boot-modules/spring-boot-keycloak/src/test/java/com/baeldung/keycloaksoap/KeycloakSoapIntegrationTest.java +++ b/spring-boot-modules/spring-boot-keycloak/src/test/java/com/baeldung/keycloaksoap/KeycloakSoapLiveTest.java @@ -26,29 +26,35 @@ import java.util.Objects; import static org.assertj.core.api.Assertions.assertThat; /** - * The class contains Live/Integration tests. + * The class contains Live tests. * These tests expect that the Keycloak server is up and running on port 8080. - * The tests may fail without a Keycloak server. */ -@DisplayName("Keycloak SOAP Webservice Unit Tests") +@DisplayName("Keycloak SOAP Webservice Live Tests") @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @ActiveProfiles("test") @AutoConfigureMockMvc -class KeycloakSoapIntegrationTest { +class KeycloakSoapLiveTest { + + private static final Logger logger = LoggerFactory.getLogger(KeycloakSoapLiveTest.class); - private static final Logger logger = LoggerFactory.getLogger(KeycloakSoapIntegrationTest.class); @LocalServerPort private int port; + @Autowired private TestRestTemplate restTemplate; + @Autowired private ObjectMapper objectMapper; + @Value("${grant.type}") private String grantType; + @Value("${client.id}") private String clientId; + @Value("${client.secret}") private String clientSecret; + @Value("${url}") private String keycloakUrl;