use of org.finos.legend.sdlc.server.gitlab.api.GitLabProjectApiTestResource in project legend-sdlc by finos.
the class TestGitLabServerProjectApis method setUpProjectApi.
/**
* Authenticates with OAuth2 and instantiate the test SDLC GitLabProjectApi.
*
* @throws LegendSDLCServerException if cannot authenticates to GitLab.
*/
private static void setUpProjectApi() throws LegendSDLCServerException {
GitLabConfiguration gitLabConfig = GitLabConfiguration.newGitLabConfiguration(null, null, null, null, GitLabConfiguration.NewProjectVisibility.PRIVATE);
ProjectStructureConfiguration projectStructureConfig = ProjectStructureConfiguration.emptyConfiguration();
GitLabUserContext gitLabUserContext = prepareGitLabOwnerUserContext();
GitLabProjectApi gitLabProjectApi = new GitLabProjectApi(gitLabConfig, gitLabUserContext, projectStructureConfig, null, gitLabConfig, backgroundTaskProcessor, null);
gitLabProjectApiTestResource = new GitLabProjectApiTestResource(gitLabProjectApi);
}
use of org.finos.legend.sdlc.server.gitlab.api.GitLabProjectApiTestResource in project legend-sdlc by finos.
the class IntegrationTestGitLabProjectApis method setUpProjectApi.
/**
* Authenticates with OAuth2 and instantiate the test SDLC GitLabProjectApi.
*
* @throws LegendSDLCServerException if cannot authenticates to GitLab.
*/
private static void setUpProjectApi() throws LegendSDLCServerException {
GitLabConfiguration gitLabConfig = GitLabConfiguration.newGitLabConfiguration(null, null, null, null, null);
ProjectStructureConfiguration projectStructureConfig = ProjectStructureConfiguration.emptyConfiguration();
GitLabUserContext gitLabUserContext = prepareGitLabOwnerUserContext();
GitLabProjectApi gitLabProjectApi = new GitLabProjectApi(gitLabConfig, gitLabUserContext, projectStructureConfig, null, null, backgroundTaskProcessor, null);
gitLabProjectApiTestResource = new GitLabProjectApiTestResource(gitLabProjectApi);
}
Aggregations