aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/test/java
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2012-01-06 03:34:42 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2012-01-06 11:33:12 +0400
commitc578ba2e7ed8cc57bc3e8f2d7e753dea400571e3 (patch)
tree21061a3e22f5f9b91bfe180dee015ec6e411079b /sonar-server/src/test/java
parentd6d3ab523925f43f8b03aa158b3596c86f5a30ca (diff)
downloadsonarqube-c578ba2e7ed8cc57bc3e8f2d7e753dea400571e3.tar.gz
sonarqube-c578ba2e7ed8cc57bc3e8f2d7e753dea400571e3.zip
SONAR-3138 Fallback to database from plugin authenticator
Diffstat (limited to 'sonar-server/src/test/java')
-rw-r--r--sonar-server/src/test/java/org/sonar/server/ui/AuthenticatorFactoryTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/sonar-server/src/test/java/org/sonar/server/ui/AuthenticatorFactoryTest.java b/sonar-server/src/test/java/org/sonar/server/ui/AuthenticatorFactoryTest.java
index 0943141b0f4..c36aa0f3ddb 100644
--- a/sonar-server/src/test/java/org/sonar/server/ui/AuthenticatorFactoryTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/ui/AuthenticatorFactoryTest.java
@@ -35,6 +35,7 @@ public class AuthenticatorFactoryTest {
public void doNotFailIfNoAuthenticationPlugins() {
AuthenticatorFactory factory = new AuthenticatorFactory(new Settings());
assertThat(factory.getAuthenticator(), nullValue());
+ factory.start();
}
@Test
@@ -68,6 +69,15 @@ public class AuthenticatorFactoryTest {
factory.getAuthenticator();
}
+ @Test(expected = AuthenticatorNotFoundException.class)
+ public void noAuthenticators() {
+ Settings settings = new Settings();
+ settings.setProperty(CoreProperties.CORE_AUTHENTICATOR_CLASS, "foo");
+
+ AuthenticatorFactory factory = new AuthenticatorFactory(settings, null);
+ factory.start();
+ }
+
@Test
public void ignoreStartupFailure() {
Settings settings = new Settings();