use of de.catma.repository.git.managers.GitlabManagerPrivileged in project catma by forTEXT.
the class GitSourceDocumentHandlerTest method setUp.
@BeforeEach
public void setUp() throws Exception {
// create a fake CATMA user which we'll use to instantiate GitlabManagerRestricted (using the corresponding impersonation token) & JGitRepoManager
Integer randomUserId = Integer.parseInt(RandomStringUtils.randomNumeric(3));
String username = String.format("testuser-%s", randomUserId);
String email = String.format("%s@catma.de", username);
String name = String.format("Test User %s", randomUserId);
gitlabManagerPrivileged = new GitlabManagerPrivileged();
String impersonationToken = gitlabManagerPrivileged.acquireImpersonationToken(username, "catma", email, name).getSecond();
EventBus mockEventBus = mock(EventBus.class);
BackgroundService mockBackgroundService = mock(BackgroundService.class);
gitlabManagerRestricted = new GitlabManagerRestricted(mockEventBus, mockBackgroundService, impersonationToken);
}
Aggregations