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

Skip to content
Snippets Groups Projects
Commit d07efe56 authored by Michael Breu's avatar Michael Breu
Browse files

Analyzing

parent 05a2f1ca
Branches
1 merge request!211Merge new meta data indexing
......@@ -50,6 +50,7 @@ import org.apache.commons.lang3.StringUtils;
import org.codeability.sharing.plugins.api.search.SearchResultDTO;
import org.codeability.sharing.plugins.api.search.SearchResultDTO.GitProject;
import org.codeability.sharing.plugins.api.search.SearchResultDTO.MetadataFile;
import org.codeability.sharing.plugins.api.search.SearchResultDTO.PluginActionInfo;
import org.codeability.sharing.plugins.api.search.UserProvidedMetadataDTO;
import org.codeability.sharing.plugins.api.search.UserProvidedMetadataDTO.InteractivityTypeXXX;
import org.codeability.sharing.plugins.api.search.UserProvidedMetadataDTO.PublicVisibility;
......@@ -913,8 +914,11 @@ public class GitlabEventService {
);
@PostConstruct
public void setAdminApi() throws GitLabApiException {
public void setAdminApi() {
adminGitLabApi = gitLabRepository.getAdminGitLabApi();
logger.debug("gitlab url: {}", adminGitLabApi.getGitLabServerUrl());
logger.debug("gitlab auth: {}", adminGitLabApi.getAuthToken());
logger.debug("gitlab private: {}", adminGitLabApi.getSecretToken());
}
@SuppressWarnings({ "PMD.CognitiveComplexity", "PMD.CyclomaticComplexity" })
......
......@@ -15,8 +15,10 @@ import at.ac.uibk.gitsearch.repository.search.testESService.ElasticSearchTestCon
import at.ac.uibk.gitsearch.service.MailService;
import at.ac.uibk.gitsearch.service.gitlab_events.GitlabEventService.AnalysedCommit;
import at.ac.uibk.gitsearch.service.gitlab_events.GitlabEventService.Indexing;
import co.elastic.clients.elasticsearch.cat.aliases.AliasesRecord;
import co.elastic.clients.elasticsearch.cat.indices.IndicesRecord;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.exc.StreamReadException;
import com.fasterxml.jackson.databind.DatabindException;
......@@ -24,6 +26,7 @@ import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectReader;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
......@@ -32,7 +35,9 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.stream.Stream;
import javax.el.MethodNotFoundException;
import org.codeability.sharing.plugins.api.search.SearchResultDTO;
import org.elasticsearch.node.NodeValidationException;
import org.gitlab4j.api.GitLabApiException;
......@@ -151,7 +156,7 @@ class GitlabEventServiceIT {
@MethodSource
@Timeout(value = 2, unit = TimeUnit.MINUTES)
void allTestSystemHooks(String testResource) throws IOException {
assertThat(gitLabRepository.getAdminGitLabApi().getSecretToken())
assertThat(gitLabRepository.getAdminGitLabApi().getAuthToken())
.describedAs("This test requires a valid admin access token")
.isNotBlank();
SystemHookEvent someEvent = getTestSystemHookEvent(testResource);
......@@ -190,7 +195,7 @@ class GitlabEventServiceIT {
@Test
@Timeout(value = 30, unit = TimeUnit.MINUTES)
void simpleDeleteTest() throws StreamReadException, DatabindException, IOException, GitLabApiException, InterruptedException {
assertThat(gitLabRepository.getAdminGitLabApi().getSecretToken())
assertThat(gitLabRepository.getAdminGitLabApi().getAuthToken())
.describedAs("This test requires a valid admin access token")
.isNotBlank();
PushSystemHookEvent collectionCommitEvent = (PushSystemHookEvent) getCollectionCommitEvent();
......@@ -263,7 +268,7 @@ class GitlabEventServiceIT {
@Test
@Timeout(value = 30, unit = TimeUnit.MINUTES)
void simpleIndexAllTest() throws GitLabApiException, IOException {
assertThat(gitLabRepository.getAdminGitLabApi().getSecretToken())
assertThat(gitLabRepository.getAdminGitLabApi().getAuthToken())
.describedAs("This test requires a valid admin access token")
.isNotBlank();
......
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