Search in sources :

Example 1 with CrowdSecurityRealm

use of de.theit.jenkins.crowd.CrowdSecurityRealm in project configuration-as-code-plugin by jenkinsci.

the class Crowd2Test method configure_artifact_manager.

@Test
@ConfiguredWithReadme("crowd2/README.md")
public void configure_artifact_manager() {
    SecurityRealm realm = Jenkins.get().getSecurityRealm();
    assertThat(realm, instanceOf(CrowdSecurityRealm.class));
    CrowdSecurityRealm securityRealm = (CrowdSecurityRealm) realm;
    assertThat(securityRealm.applicationName, is("jenkins"));
    assertThat(securityRealm.group, is("jenkins-users"));
    assertThat(securityRealm.url, is("http://crowd.company.io"));
    assertThat(securityRealm.password, hasPlainText(PASSWORD_123));
}
Also used : CrowdSecurityRealm(de.theit.jenkins.crowd.CrowdSecurityRealm) SecurityRealm(hudson.security.SecurityRealm) CrowdSecurityRealm(de.theit.jenkins.crowd.CrowdSecurityRealm) Test(org.junit.Test) ConfiguredWithReadme(io.jenkins.plugins.casc.misc.ConfiguredWithReadme)

Aggregations

CrowdSecurityRealm (de.theit.jenkins.crowd.CrowdSecurityRealm)1 SecurityRealm (hudson.security.SecurityRealm)1 ConfiguredWithReadme (io.jenkins.plugins.casc.misc.ConfiguredWithReadme)1 Test (org.junit.Test)1