Skip to content

Commit

Permalink
arghs the constructor trap
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sprauer <[email protected]>
  • Loading branch information
MichaelSp committed Sep 4, 2019
1 parent 58873a7 commit f589449
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
import java.util.ArrayList;
import java.util.List;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;


public class ActiveDirectorySecurityRealmTest {
Expand Down Expand Up @@ -285,7 +288,7 @@ public void testAdvancedOptionsVisibleWithNonNativeAuthentication() throws Excep
ActiveDirectoryDomain activeDirectoryDomain = new ActiveDirectoryDomain(TheFlintstonesTest.AD_DOMAIN, null, null, TheFlintstonesTest.AD_MANAGER_DN, TheFlintstonesTest.AD_MANAGER_DN_PASSWORD);
List<ActiveDirectoryDomain> domains = new ArrayList<>(1);
domains.add(activeDirectoryDomain);
ActiveDirectorySecurityRealm activeDirectorySecurityRealm = new ActiveDirectorySecurityRealm(null, domains, null, null, null, null, GroupLookupStrategy.RECURSIVE, false, true, null, false, null, null, null);
ActiveDirectorySecurityRealm activeDirectorySecurityRealm = new ActiveDirectorySecurityRealm(null, domains, null, null, null, null, GroupLookupStrategy.RECURSIVE, false, true, null, false, null, null);
Jenkins.getInstance().setSecurityRealm(activeDirectorySecurityRealm);
DomElement domElement = jenkinsRule.createWebClient().goTo("configureSecurity").getElementByName("startTls");
assertTrue(domElement != null);
Expand All @@ -297,7 +300,7 @@ public void testCacheOptionAlwaysVisible() throws Exception {
ActiveDirectoryDomain activeDirectoryDomain = new ActiveDirectoryDomain(TheFlintstonesTest.AD_DOMAIN, null, null, TheFlintstonesTest.AD_MANAGER_DN, TheFlintstonesTest.AD_MANAGER_DN_PASSWORD);
List<ActiveDirectoryDomain> domains = new ArrayList<>(1);
domains.add(activeDirectoryDomain);
ActiveDirectorySecurityRealm activeDirectorySecurityRealm = new ActiveDirectorySecurityRealm(null, domains, null, null, null, null, GroupLookupStrategy.RECURSIVE, false, true, null, false, null, null, null);
ActiveDirectorySecurityRealm activeDirectorySecurityRealm = new ActiveDirectorySecurityRealm(null, domains, null, null, null, null, GroupLookupStrategy.RECURSIVE, false, true, null, false, null, null);
Jenkins.getInstance().setSecurityRealm(activeDirectorySecurityRealm);
DomElement domElement = jenkinsRule.createWebClient().goTo("configureSecurity").getElementByName("cache");
assertTrue(domElement != null);
Expand Down

0 comments on commit f589449

Please sign in to comment.