Merge pull request #1595 from mposolda/master

Add 'Testsuite' prefix to the dummy providers used for testing only
This commit is contained in:
Marek Posolda 2015-09-04 13:53:10 +02:00
commit 413db0dce1
6 changed files with 21 additions and 15 deletions

View file

@ -24,7 +24,9 @@ import org.keycloak.models.IdentityProviderModel;
import org.keycloak.social.SocialIdentityProvider;
import org.keycloak.social.SocialIdentityProviderFactory;
import org.keycloak.testsuite.broker.provider.CustomIdentityProvider;
import org.keycloak.testsuite.broker.provider.CustomIdentityProviderFactory;
import org.keycloak.testsuite.broker.provider.social.CustomSocialProvider;
import org.keycloak.testsuite.broker.provider.social.CustomSocialProviderFactory;
import java.util.Set;
@ -51,7 +53,7 @@ public class IdentityProviderRegistrationTest extends AbstractIdentityProviderMo
@Test
public void testCustomSocialProviderRegistration() {
String providerId = "custom-social-provider";
String providerId = CustomSocialProviderFactory.PROVIDER_ID;
assertTrue(getInstalledProviders().contains(providerId));
@ -74,7 +76,7 @@ public class IdentityProviderRegistrationTest extends AbstractIdentityProviderMo
@Test
public void testCustomIdentityProviderRegistration() {
String providerId = "custom-identity-provider";
String providerId = CustomIdentityProviderFactory.PROVIDER_ID;
assertTrue(getInstalledProviders().contains(providerId));

View file

@ -25,9 +25,11 @@ import org.keycloak.models.IdentityProviderModel;
*/
public class CustomIdentityProviderFactory extends AbstractIdentityProviderFactory<CustomIdentityProvider> {
public static final String PROVIDER_ID = "testsuite-custom-identity-provider";
@Override
public String getName() {
return "Custom Identity Provider";
return "Testsuite Custom Identity Provider";
}
@Override
@ -37,6 +39,6 @@ public class CustomIdentityProviderFactory extends AbstractIdentityProviderFacto
@Override
public String getId() {
return "custom-identity-provider";
return PROVIDER_ID;
}
}

View file

@ -26,9 +26,11 @@ import org.keycloak.social.SocialIdentityProviderFactory;
*/
public class CustomSocialProviderFactory extends AbstractIdentityProviderFactory<CustomSocialProvider> implements SocialIdentityProviderFactory<CustomSocialProvider> {
public static final String PROVIDER_ID = "testsuite-custom-social-provider";
@Override
public String getName() {
return "Custom Social Provider";
return "Testsuite Dummy Custom Social Provider";
}
@Override
@ -38,6 +40,6 @@ public class CustomSocialProviderFactory extends AbstractIdentityProviderFactory
@Override
public String getId() {
return "custom-social-provider";
return PROVIDER_ID;
}
}

View file

@ -20,7 +20,7 @@ import java.util.List;
* @version $Revision: 1 $
*/
public class PassThroughAuthenticator implements Authenticator, AuthenticatorFactory {
public static final String PROVIDER_ID = "dummy-passthrough";
public static final String PROVIDER_ID = "testsuite-dummy-passthrough";
public static String username = "test-user@localhost";
@Override
@ -56,7 +56,7 @@ public class PassThroughAuthenticator implements Authenticator, AuthenticatorFac
@Override
public String getDisplayType() {
return "Dummy Pass Thru";
return "Testsuite Dummy Pass Thru";
}
@Override
@ -85,7 +85,7 @@ public class PassThroughAuthenticator implements Authenticator, AuthenticatorFac
@Override
public String getHelpText() {
return "Dummy authenticator. Just passes through and is hardcoded to a specific user";
return "Testsuite Dummy authenticator. Just passes through and is hardcoded to a specific user";
}
@Override

View file

@ -19,7 +19,7 @@ import org.keycloak.provider.ProviderConfigProperty;
*/
public class PassThroughClientAuthenticator extends AbstractClientAuthenticator {
public static final String PROVIDER_ID = "client-passthrough";
public static final String PROVIDER_ID = "testsuite-client-passthrough";
public static String clientId = "test-app";
public static final AuthenticationExecutionModel.Requirement[] REQUIREMENT_CHOICES = {
@ -60,7 +60,7 @@ public class PassThroughClientAuthenticator extends AbstractClientAuthenticator
@Override
public String getDisplayType() {
return "PassThrough Client Validation";
return "Testsuite Dummy Client Validation";
}
@Override
@ -80,7 +80,7 @@ public class PassThroughClientAuthenticator extends AbstractClientAuthenticator
@Override
public String getHelpText() {
return "Automatically authenticates client 'test-app' ";
return "Testsuite dummy authenticator, which automatically authenticates hardcoded client (like 'test-app' )";
}
@Override

View file

@ -21,7 +21,7 @@ import java.util.List;
* @version $Revision: 1 $
*/
public class PassThroughRegistration implements Authenticator, AuthenticatorFactory {
public static final String PROVIDER_ID = "dummy-registration";
public static final String PROVIDER_ID = "testsuite-dummy-registration";
public static String username = "new-user@localhost";
public static String email = "new-user@localhost";
@ -72,7 +72,7 @@ public class PassThroughRegistration implements Authenticator, AuthenticatorFact
@Override
public String getDisplayType() {
return "Dummy Pass Thru";
return "Testsuite Dummy Pass Thru";
}
@Override
@ -101,7 +101,7 @@ public class PassThroughRegistration implements Authenticator, AuthenticatorFact
@Override
public String getHelpText() {
return "Dummy authenticator. Just passes through and is hardcoded to a specific user";
return "Testsuite Dummy authenticator. Just passes through and is hardcoded to a specific user";
}
@Override