This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 2d4f4d06 authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

finally fixed tests and some sonar

parent 270a53b3
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
......@@ -3,12 +3,9 @@ package at.ac.uibk.gitsearch.es.model;
import java.util.List;
import java.util.Objects;
import org.codeability.sharing.plugins.api.search.UserProvidedMetadataDTO.Person;
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import at.ac.uibk.gitsearch.service.dto.MetadataUserDTO;
......@@ -49,6 +46,7 @@ public class ExerciseInfo {
private String version;
public ExerciseInfo() {
// for JSON
}
public List<String> getAssesses() {
......
......@@ -68,7 +68,7 @@ public class GitlabService {
@Autowired
private FileService fileService;
private final static Logger log = LoggerFactory.getLogger(ShoppingBasketService.class);
private static final Logger log = LoggerFactory.getLogger(ShoppingBasketService.class);
public Boolean repositoryExists(String projectID) {
......@@ -194,7 +194,7 @@ public class GitlabService {
// If repository already exist, return it
return projectApi.getProject(group.getFullPath() + "/" + repoName.replace(" ", "-")).getWebUrl();
} catch (GitLabApiException ignored) {
log.debug("not relevant here" + ignored.getMessage());
}
Project project = new Project()
......@@ -300,7 +300,7 @@ public class GitlabService {
User principal = tokenProvider.getCurrentPrincipal().orElseThrow(AuthenticationException::new);
Collection<String> authorities = principal.getAuthorities().stream().map(GrantedAuthority::getAuthority).collect(Collectors.toList());
return groupApi.getGroups().stream().filter((group) -> authorities.contains(group.getFullPath())).collect(Collectors.toList());
return groupApi.getGroups().stream().filter(group -> authorities.contains(group.getFullPath())).collect(Collectors.toList());
}
/**
......
......@@ -84,7 +84,7 @@ public class SearchResourceIT {
@Test
public void getREADME() throws Exception {
String exerciseId = "3"; // warning: this depends on the sequence in the current search index :-(
String exerciseId = "318"; // warning: this depends on the sequence in the current search index :-(
restSearchMockMvc.perform(post("/api/programming-exercises/"+exerciseId+"/export-programming-exercise")
.with(csrf().asHeader())
.contentType(MediaType.APPLICATION_JSON))
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment