use of hudson.plugins.active_directory.ActiveDirectoryDomain in project configuration-as-code-plugin by jenkinsci.
the class ActiveDirectoryTest method configure_active_directory.
@Test
@ConfiguredWithCode(value = "ActiveDirectoryTest.yml")
public void configure_active_directory() throws Exception {
final Jenkins jenkins = Jenkins.getInstance();
final ActiveDirectorySecurityRealm realm = (ActiveDirectorySecurityRealm) jenkins.getSecurityRealm();
assertEquals(1, realm.domains.size());
final ActiveDirectoryDomain domain = realm.domains.get(0);
assertEquals("acme", domain.name);
assertEquals("admin", domain.bindName);
assertEquals("ADMIN123", domain.bindPassword.getPlainText());
assertEquals("ad1.acme.com:123,ad2.acme.com:456", domain.servers);
assertTrue(realm.removeIrrelevantGroups);
assertTrue(realm.startTls);
}
Aggregations