use of jenkins.security.s2m.AdminWhitelistRule in project configuration-as-code-plugin by jenkinsci.
the class AdminWhitelistRuleConfigurator method configure.
@Override
public AdminWhitelistRule configure(Object config) throws Exception {
Injector injector = Jenkins.getInstance().getInjector();
AdminWhitelistRule instance = injector.getInstance(AdminWhitelistRule.class);
configure((Map) config, instance);
return instance;
}
use of jenkins.security.s2m.AdminWhitelistRule in project configuration-as-code-plugin by jenkinsci.
the class AdminWhitelistRuleConfiguratorTest method checkM2ASecurityKillSwitch_enabled.
@Test
@Issue("Issue #28")
@ConfiguredWithCode("AdminWhitelistRuleConfigurator/Agent2MasterSecurityKillSwitch_disabled.yml")
public void checkM2ASecurityKillSwitch_enabled() {
final Jenkins jenkins = Jenkins.get();
AdminWhitelistRule rule = jenkins.getInjector().getInstance(AdminWhitelistRule.class);
Assert.assertTrue("MasterToAgent Security should be enabled", rule.getMasterKillSwitch());
}
Aggregations