Search in sources :

Example 11 with JenkinsConfig

use of org.jenkinsci.test.acceptance.po.JenkinsConfig in project acceptance-test-harness by jenkinsci.

the class OpenstackCloudPluginTest method testConnection.

@Test
public void testConnection() {
    JenkinsConfig config = jenkins.getConfigPage();
    config.configure();
    OpenstackCloud cloud = addCloud(config);
    FormValidation val = cloud.testConnection();
    assertThat(val, FormValidation.reports(OK, "Connection succeeded!"));
}
Also used : OpenstackCloud(org.jenkinsci.test.acceptance.plugins.openstack.OpenstackCloud) FormValidation(org.jenkinsci.test.acceptance.po.FormValidation) JenkinsConfig(org.jenkinsci.test.acceptance.po.JenkinsConfig) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test)

Example 12 with JenkinsConfig

use of org.jenkinsci.test.acceptance.po.JenkinsConfig in project acceptance-test-harness by jenkinsci.

the class KerberosSsoTest method configureSso.

/**
 * Turn the SSO on in Jenkins.
 *
 * @param allowAnonymous Require authentication on all URLs.
 * @param allowBasic Allow basic authentication.
 */
private void configureSso(KerberosContainer kdc, boolean allowAnonymous, boolean allowBasic) {
    // Turn Jenkins side debugging on
    jenkins.runScript("System.setProperty('sun.security.krb5.debug', 'true'); System.setProperty('sun.security.spnego.debug', 'true');");
    JenkinsConfig config = jenkins.getConfigPage();
    config.configure();
    KerberosGlobalConfig kgc = new KerberosGlobalConfig(config);
    kgc.enable();
    kgc.krb5Conf(kdc.getKrb5ConfPath());
    kgc.loginConf(kdc.getLoginConfPath());
    kgc.allowLocalhost(false);
    kgc.allowBasic(allowBasic);
    kgc.allowAnonymous(allowAnonymous);
    config.save();
}
Also used : JenkinsConfig(org.jenkinsci.test.acceptance.po.JenkinsConfig)

Aggregations

JenkinsConfig (org.jenkinsci.test.acceptance.po.JenkinsConfig)12 Test (org.junit.Test)7 AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)6 FreeStyleJob (org.jenkinsci.test.acceptance.po.FreeStyleJob)4 FormValidation (org.jenkinsci.test.acceptance.po.FormValidation)3 VersionNumber (hudson.util.VersionNumber)2 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)1 SvnContainer (org.jenkinsci.test.acceptance.docker.fixtures.SvnContainer)1 Tomcat7Container (org.jenkinsci.test.acceptance.docker.fixtures.Tomcat7Container)1 DockerTest (org.jenkinsci.test.acceptance.junit.DockerTest)1 WithPlugins (org.jenkinsci.test.acceptance.junit.WithPlugins)1 ArtifactoryGlobalConfig (org.jenkinsci.test.acceptance.plugins.artifactory.ArtifactoryGlobalConfig)1 Server (org.jenkinsci.test.acceptance.plugins.artifactory.ArtifactoryGlobalConfig.Server)1 JcascManage (org.jenkinsci.test.acceptance.plugins.configuration_as_code.JcascManage)1 DeployPublisher (org.jenkinsci.test.acceptance.plugins.deploy.DeployPublisher)1 GlobalDockerConfig (org.jenkinsci.test.acceptance.plugins.docker_build_step.GlobalDockerConfig)1 JobConfigHistory (org.jenkinsci.test.acceptance.plugins.job_config_history.JobConfigHistory)1 MissionControlView (org.jenkinsci.test.acceptance.plugins.mission_control.MissionControlView)1 OpenstackCloud (org.jenkinsci.test.acceptance.plugins.openstack.OpenstackCloud)1 SubversionScm (org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm)1