aboutsummaryrefslogtreecommitdiffstats
path: root/it
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2016-06-17 18:01:48 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2016-06-29 08:39:32 +0200
commit102faa7f46c509fd2bf7f3d933b78375ca2f4166 (patch)
tree46bd422b6d69e8c1e9c6e27b1ca2e9f0edeb74cb /it
parent9dc5ec05a0301fb2b46b621c5de3eb5ef4752119 (diff)
downloadsonarqube-102faa7f46c509fd2bf7f3d933b78375ca2f4166.tar.gz
sonarqube-102faa7f46c509fd2bf7f3d933b78375ca2f4166.zip
SONAR-7732 Authentication is now done in Java
Diffstat (limited to 'it')
-rw-r--r--it/it-plugins/security-plugin/src/main/java/FakeAuthenticator.java2
-rw-r--r--it/it-tests/src/test/java/it/user/RailsExternalAuthenticationTest.java14
2 files changed, 8 insertions, 8 deletions
diff --git a/it/it-plugins/security-plugin/src/main/java/FakeAuthenticator.java b/it/it-plugins/security-plugin/src/main/java/FakeAuthenticator.java
index 6455d260b89..8e75d9c1fcf 100644
--- a/it/it-plugins/security-plugin/src/main/java/FakeAuthenticator.java
+++ b/it/it-plugins/security-plugin/src/main/java/FakeAuthenticator.java
@@ -90,7 +90,7 @@ public class FakeAuthenticator implements LoginPasswordAuthenticator {
private void checkExistence(String username) {
if (!data.containsKey(username + ".password")) {
- throw new RuntimeException("No such user");
+ throw new IllegalArgumentException("No such user : " + username);
}
}
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 6ce7c2ec88f..c0692cd7820 100644
--- a/it/it-tests/src/test/java/it/user/RailsExternalAuthenticationTest.java
+++ b/it/it-tests/src/test/java/it/user/RailsExternalAuthenticationTest.java
@@ -19,6 +19,13 @@
*/
package it.user;
+import static java.net.HttpURLConnection.HTTP_OK;
+import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.Assert.fail;
+import static util.ItUtils.pluginArtifact;
+import static util.ItUtils.setServerProperty;
+
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.sonar.orchestrator.Orchestrator;
@@ -51,13 +58,6 @@ import org.sonarqube.ws.client.WsResponse;
import util.QaOnly;
import util.selenium.SeleneseTest;
-import static java.net.HttpURLConnection.HTTP_OK;
-import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.fail;
-import static util.ItUtils.pluginArtifact;
-import static util.ItUtils.setServerProperty;
-
/**
* Test deprecated authentication done by Rails. It's kept has every features has not bee migrated to java yet.
*