diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2013-06-29 19:07:40 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-06-29 19:07:40 +0200 |
commit | b319c87ecf00b6c95b5dcb7924bdc8689b5153a0 (patch) | |
tree | d47b7d4e19848a3c22778b7a6b0466bdb9e9a1f7 /sonar-core/src/test | |
parent | 70b6abe27893c2bef042cce311e0e4d90654e23f (diff) | |
download | sonarqube-b319c87ecf00b6c95b5dcb7924bdc8689b5153a0.tar.gz sonarqube-b319c87ecf00b6c95b5dcb7924bdc8689b5153a0.zip |
SONAR-4412 revert check of last remaining admin user
Diffstat (limited to 'sonar-core/src/test')
-rw-r--r-- | sonar-core/src/test/java/org/sonar/core/user/RoleDaoTest.java | 13 | ||||
-rw-r--r-- | sonar-core/src/test/resources/org/sonar/core/user/RoleDaoTest/systemAdminsCount.xml | 23 |
2 files changed, 0 insertions, 36 deletions
diff --git a/sonar-core/src/test/java/org/sonar/core/user/RoleDaoTest.java b/sonar-core/src/test/java/org/sonar/core/user/RoleDaoTest.java index 127ba6ab654..33eae64cf56 100644 --- a/sonar-core/src/test/java/org/sonar/core/user/RoleDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/user/RoleDaoTest.java @@ -75,17 +75,4 @@ public class RoleDaoTest extends AbstractDaoTestCase { checkTable("groupPermissions", "group_roles", "group_id", "role"); } - @Test - public void should_retrieve_system_admins_count() throws Exception { - setupData("systemAdminsCount"); - - RoleDao dao = new RoleDao(getMyBatis()); - int overallAdminsCount = dao.countSystemAdministrators(null); - int adminsCountAfterWholeGroupRemoval = dao.countSystemAdministrators("sonar-administrators"); - int adminsCountAfterNonAdminGroupRemoval = dao.countSystemAdministrators("sonar-users"); - - assertThat(overallAdminsCount).isEqualTo(3); - assertThat(adminsCountAfterWholeGroupRemoval).isEqualTo(1); - assertThat(adminsCountAfterNonAdminGroupRemoval).isEqualTo(3); - } } diff --git a/sonar-core/src/test/resources/org/sonar/core/user/RoleDaoTest/systemAdminsCount.xml b/sonar-core/src/test/resources/org/sonar/core/user/RoleDaoTest/systemAdminsCount.xml deleted file mode 100644 index f39cc938f24..00000000000 --- a/sonar-core/src/test/resources/org/sonar/core/user/RoleDaoTest/systemAdminsCount.xml +++ /dev/null @@ -1,23 +0,0 @@ -<dataset> - - <users id="200" login="admin" name="admin" active="[true]"/> - <users id="201" login="user_admin" name="user_admin" active="[true]"/> - <users id="202" login="user_in_admin_group" name="user_in_admin_group" active="[true]"/> - <users id="203" login="non_admin" name="non_admin" active="[true]"/> - - <user_roles id="1" user_id="201" role="admin"/> - - <groups_users group_id="100" user_id="200"/> - <groups_users group_id="100" user_id="202"/> - <groups_users group_id="101" user_id="201"/> - <groups_users group_id="101" user_id="203"/> - - <groups id="100" name="sonar-administrators"/> - <groups id="101" name="sonar-users"/> - - <group_roles id="1" group_id="100" role="admin"/> - <group_roles id="2" group_id="100" role="profileadmin"/> - <group_roles id="3" group_id="100" role="sharedashboard"/> - <group_roles id="4" group_id="101" role="sharedashboard"/> - -</dataset>
\ No newline at end of file |