Skip to content

Commit

Permalink
Pull request #267: Health check update to improve mapping
Browse files Browse the repository at this point in the history
Merge in ITB/itb-commons from development to master

* commit '58943181480db0c3eaef6947a5adced9800950a7':
  Health check update to improve mapping
  • Loading branch information
costas80 committed Sep 16, 2024
2 parents 8a2e320 + 5894318 commit 58ba1d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.print.attribute.standard.Media;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
Expand Down Expand Up @@ -116,7 +115,7 @@ public ApiInfo info(
@ApiResponse(responseCode = "500", description = "Error (If a problem occurred with processing the request)", content = @Content)
@ApiResponse(responseCode = "404", description = "Not found (for an invalid domain value)", content = @Content)
@GetMapping(value = {"/api/healthcheck", "/{domain}/api/healthcheck"}, consumes = MediaType.ALL_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity healthcheck(
public ResponseEntity<Void> healthCheck(
@Parameter(name = "domain", description = "A fixed value corresponding to the specific validation domain.",
examples = {
@ExampleObject(name="order", summary="Sample 'order' configuration", value="order", description = "The domain value to use for the demo 'order' validator."),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ void testInfo() {
}

@Test
void testHealthcheck() {
assertEquals(HttpStatusCode.valueOf(200), controller.healthcheck("domain1Name").getStatusCode());
assertEquals(HttpStatusCode.valueOf(200), controller.healthcheck("").getStatusCode());
void testHealthCheck() {
assertEquals(HttpStatusCode.valueOf(200), controller.healthCheck("domain1Name").getStatusCode());
assertEquals(HttpStatusCode.valueOf(200), controller.healthCheck("").getStatusCode());
}

@Test
Expand Down

0 comments on commit 58ba1d4

Please sign in to comment.