Search in sources :

Example 1 with GitLabProjectApiTestResource

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);
}
Also used : GitLabConfiguration(org.finos.legend.sdlc.server.gitlab.GitLabConfiguration) GitLabProjectApi(org.finos.legend.sdlc.server.gitlab.api.GitLabProjectApi) GitLabUserContext(org.finos.legend.sdlc.server.gitlab.auth.GitLabUserContext) GitLabProjectApiTestResource(org.finos.legend.sdlc.server.gitlab.api.GitLabProjectApiTestResource) ProjectStructureConfiguration(org.finos.legend.sdlc.server.project.config.ProjectStructureConfiguration)

Example 2 with GitLabProjectApiTestResource

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);
}
Also used : GitLabConfiguration(org.finos.legend.sdlc.server.gitlab.GitLabConfiguration) GitLabProjectApi(org.finos.legend.sdlc.server.gitlab.api.GitLabProjectApi) GitLabUserContext(org.finos.legend.sdlc.server.gitlab.auth.GitLabUserContext) GitLabProjectApiTestResource(org.finos.legend.sdlc.server.gitlab.api.GitLabProjectApiTestResource) ProjectStructureConfiguration(org.finos.legend.sdlc.server.project.config.ProjectStructureConfiguration)

Aggregations

GitLabConfiguration (org.finos.legend.sdlc.server.gitlab.GitLabConfiguration)2 GitLabProjectApi (org.finos.legend.sdlc.server.gitlab.api.GitLabProjectApi)2 GitLabProjectApiTestResource (org.finos.legend.sdlc.server.gitlab.api.GitLabProjectApiTestResource)2 GitLabUserContext (org.finos.legend.sdlc.server.gitlab.auth.GitLabUserContext)2 ProjectStructureConfiguration (org.finos.legend.sdlc.server.project.config.ProjectStructureConfiguration)2