Search in sources :

Example 1 with KeycloakSecurityRealm

use of org.jenkinsci.plugins.KeycloakSecurityRealm in project configuration-as-code-plugin by jenkinsci.

the class KeycloakTest method configure_artifact_manager.

@Test
@ConfiguredWithReadme("keycloak/README.md")
public void configure_artifact_manager() {
    SecurityRealm realm = j.jenkins.get().getSecurityRealm();
    assertThat(realm, instanceOf(KeycloakSecurityRealm.class));
    KeycloakSecurityRealm securityRealm = (KeycloakSecurityRealm) realm;
    assertThat(securityRealm.getKeycloakJson(), containsString("\"auth-server-url\": \"https://my-keycloak-url/auth\""));
}
Also used : SecurityRealm(hudson.security.SecurityRealm) KeycloakSecurityRealm(org.jenkinsci.plugins.KeycloakSecurityRealm) KeycloakSecurityRealm(org.jenkinsci.plugins.KeycloakSecurityRealm) Test(org.junit.Test) ConfiguredWithReadme(io.jenkins.plugins.casc.misc.ConfiguredWithReadme)

Aggregations

SecurityRealm (hudson.security.SecurityRealm)1 ConfiguredWithReadme (io.jenkins.plugins.casc.misc.ConfiguredWithReadme)1 KeycloakSecurityRealm (org.jenkinsci.plugins.KeycloakSecurityRealm)1 Test (org.junit.Test)1