diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-06-29 09:22:27 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-06-29 09:37:40 +0200 |
commit | 35fcfd2d718f8eede0f5f26106853e16f02f4769 (patch) | |
tree | 71012b375828ab9a2db3a16a92ce715df2904f5f /it | |
parent | 0f42fe401f6f72873250f45cfee84ddd138b431c (diff) | |
download | sonarqube-35fcfd2d718f8eede0f5f26106853e16f02f4769.tar.gz sonarqube-35fcfd2d718f8eede0f5f26106853e16f02f4769.zip |
SONAR-7781 Delete sonar.security.savePassword property
Diffstat (limited to 'it')
-rw-r--r-- | it/it-tests/src/test/java/it/user/RailsExternalAuthenticationTest.java | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/it/it-tests/src/test/java/it/user/RailsExternalAuthenticationTest.java b/it/it-tests/src/test/java/it/user/RailsExternalAuthenticationTest.java index c0692cd7820..048eb41037f 100644 --- a/it/it-tests/src/test/java/it/user/RailsExternalAuthenticationTest.java +++ b/it/it-tests/src/test/java/it/user/RailsExternalAuthenticationTest.java @@ -36,7 +36,6 @@ import org.apache.commons.lang.RandomStringUtils; import org.junit.After; import org.junit.Before; import org.junit.ClassRule; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -90,7 +89,6 @@ public class RailsExternalAuthenticationTest { public void resetData() throws Exception { setServerProperty(orchestrator, USERS_PROPERTY, null); setServerProperty(orchestrator, "sonar.security.updateUserAttributes", null); - setServerProperty(orchestrator, "sonar.security.savePassword", null); setServerProperty(orchestrator, "sonar.authenticator.createUsers", null); resetUsers(USER_LOGIN, TECH_USER); } @@ -177,44 +175,6 @@ public class RailsExternalAuthenticationTest { * SONAR-3138 */ @Test - @Ignore("Fail because sonar.security.savePassword is only read at startup => this test should start its own server") - public void shouldFallback() { - // Given clean Sonar installation and no users in external system - setServerProperty(orchestrator, "sonar.security.savePassword", "true"); - String login = USER_LOGIN; - String oldPassword = "1234567"; - Map<String, String> users = Maps.newHashMap(); - - // When user created in external system - users.put(login + ".password", oldPassword); - updateUsersInExtAuth(users); - // Then - assertThat(loginAttempt(login, oldPassword)).isEqualTo(AUTHORIZED); - - // When new external password was set - String newPassword = "7654321"; - users.put(login + ".password", newPassword); - updateUsersInExtAuth(users); - // Then - assertThat(loginAttempt(login, newPassword)).isEqualTo(AUTHORIZED); - - assertThat(loginAttempt(login, oldPassword)).isEqualTo(NOT_AUTHORIZED); - - assertThat(loginAttempt(login, "wrong")).isEqualTo(NOT_AUTHORIZED); - - // When external system does not work - users.remove(login + ".password"); - updateUsersInExtAuth(users); - // Then - assertThat(loginAttempt(login, newPassword)).isEqualTo(AUTHORIZED); - assertThat(loginAttempt(login, oldPassword)).isEqualTo(NOT_AUTHORIZED); - assertThat(loginAttempt(login, "wrong")).isEqualTo(NOT_AUTHORIZED); - } - - /** - * SONAR-3138 - */ - @Test public void shouldNotFallback() { // Given clean Sonar installation and no users in external system String login = USER_LOGIN; @@ -240,7 +200,6 @@ public class RailsExternalAuthenticationTest { @Test public void adminIsLocalAccountByDefault() { // Given clean Sonar installation and no users in external system - setServerProperty(orchestrator, "sonar.security.savePassword", "false"); String login = "admin"; String localPassword = "admin"; String remotePassword = "nimda"; |