Skip to content

Commit

Permalink
fix: test coverage (#3)
Browse files Browse the repository at this point in the history
Co-authored-by: milan.horvath <[email protected]>
  • Loading branch information
milanhorvath and milan.horvath authored Apr 3, 2024
1 parent 2fde360 commit c3c53d7
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public Response getWorkspaceConfig(GetWorkspaceConfigRequestDTO getWorkspaceConf

//get base workspace info
try (Response response = workspaceClient.searchWorkspaces(mapper.map(getWorkspaceConfigRequestDTO))) {
Response.ResponseBuilder responseBuilder = null;
if (!response.readEntity(WorkspacePageResult.class).getStream().isEmpty()) {
var workspaceInfo = response.readEntity(WorkspacePageResult.class).getStream().get(0);
responseDTO.setWorkspace(mapper.map(workspaceInfo, getWorkspaceConfigRequestDTO));
Expand Down Expand Up @@ -90,11 +91,12 @@ public Response getWorkspaceConfig(GetWorkspaceConfigRequestDTO getWorkspaceConf
}
//call remoteComponent Mocks => should be removed after implementation
responseDTO = mockRemoteComponents(responseDTO);
return Response.status(Response.Status.OK).entity(responseDTO).build();
responseBuilder = Response.status(Response.Status.OK).entity(responseDTO);
} else {
return Response.status(Response.Status.NOT_FOUND.getStatusCode(),
"No workspace with matching url found").build();
responseBuilder = Response.status(Response.Status.NOT_FOUND.getStatusCode(),
"No workspace with matching url found");
}
return responseBuilder.build();
}
}

Expand Down

0 comments on commit c3c53d7

Please sign in to comment.