use of org.sonar.db.permission.template.PermissionTemplateGroupDto in project sonarqube by SonarSource.
the class RegisterPermissionTemplatesTest method ignore_administrators_permissions_if_group_does_not_exist.
@Test
public void ignore_administrators_permissions_if_group_does_not_exist() {
underTest.start();
PermissionTemplateDto defaultTemplate = selectTemplate();
assertThat(defaultTemplate.getName()).isEqualTo("Default template");
List<PermissionTemplateGroupDto> groupPermissions = selectGroupPermissions(defaultTemplate);
assertThat(groupPermissions).hasSize(2);
expectGroupPermission(groupPermissions, UserRole.CODEVIEWER, DefaultGroups.ANYONE);
expectGroupPermission(groupPermissions, UserRole.USER, DefaultGroups.ANYONE);
verifyDefaultTemplates();
assertThat(logTester.logs(LoggerLevel.ERROR)).contains("Cannot setup default permission for group: sonar-administrators");
}
Aggregations