Skip to content

Commit

Permalink
Add a couple of log messages for welcome endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
RustyHMCTS committed Jan 13, 2025
1 parent ba8d4a5 commit 17a0cfe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ dependencies {
integrationTestCompileOnly 'org.projectlombok:lombok:1.18.34'
integrationTestAnnotationProcessor 'org.projectlombok:lombok:1.18.34'


implementation group: 'org.apache.xmlgraphics', name: 'fop', version: '2.10'
implementation group: 'org.apache.xmlgraphics', name: 'fop-core', version: '2.10'
implementation group: 'org.apache.xmlgraphics', name: 'fop-events', version: '2.10'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package uk.gov.hmcts.opal.controllers;

import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -16,6 +17,7 @@
@WebMvcTest
@ContextConfiguration(classes = RootController.class)
@ActiveProfiles({"integration"})
@Slf4j(topic = "GetWelcomeTest")
class GetWelcomeTest {

@Autowired
Expand All @@ -24,6 +26,7 @@ class GetWelcomeTest {
@DisplayName("Should welcome upon root request with 200 response code")
@Test
void welcomeRootEndpoint() throws Exception {
log.info(":welcomeRootEndpoint:");
MvcResult response = mockMvc.perform(get("/")).andExpect(status().isOk()).andReturn();

assertThat(response.getResponse().getContentAsString()).startsWith("Welcome");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package uk.gov.hmcts.opal.controllers;

import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
Expand All @@ -12,6 +13,7 @@
*/
@RestController
@Tag(name = "Root Controller")
@Slf4j(topic = "RootController")
public class RootController {

/**
Expand All @@ -25,6 +27,7 @@ public class RootController {
*/
@GetMapping("/")
public ResponseEntity<String> welcome() {
log.info(":welcome:");
return ok("Welcome to opal-fines-service");
}
}
2 changes: 1 addition & 1 deletion src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ opal:
file-handler-job:
cron: ${OPAL_FILE_HANDLER_JOB_CRON:0 0 * * * ?}
frontend:
url: ${OPAL_FRONTEND_URL:http://localhost:4200}
url: ${OPAL_FRONTEND_URL:http://localhost:4200}
azure:
active-directory-justice-auth-uri: https://login.microsoftonline.com
testing-support-endpoints:
Expand Down

0 comments on commit 17a0cfe

Please sign in to comment.