Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: test coverage #3

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading