Search in sources :

Example 1 with LocalSlaveController

use of org.jenkinsci.test.acceptance.slave.LocalSlaveController in project acceptance-test-harness by jenkinsci.

the class AuditTrailPluginTest method trail_should_contain_logged_events.

@Test
public void trail_should_contain_logged_events() throws Exception {
    FreeStyleJob freeStyleJob = jenkins.jobs.create(FreeStyleJob.class);
    // purpose of this is to just go through the motion of creating a new slave,
    // so this one can bypass SlaveController.
    Slave slave = new LocalSlaveController().install(jenkins).get();
    List<String> events = auditTrail.getEvents();
    assertThat(events, hasItem("/createItem (" + freeStyleJob.name + ")"));
    assertThat(events, hasItem("/computer/createItem (" + slave.getName() + ")"));
}
Also used : Slave(org.jenkinsci.test.acceptance.po.Slave) FreeStyleJob(org.jenkinsci.test.acceptance.po.FreeStyleJob) LocalSlaveController(org.jenkinsci.test.acceptance.slave.LocalSlaveController) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test)

Example 2 with LocalSlaveController

use of org.jenkinsci.test.acceptance.slave.LocalSlaveController in project acceptance-test-harness by jenkinsci.

the class ExternalWorkspaceManagerPluginTest method setUpNode.

private void setUpNode(String label, String fakeMountingPoint) throws ExecutionException, InterruptedException {
    SlaveController controller = new LocalSlaveController();
    Slave linuxSlave = controller.install(jenkins).get();
    linuxSlave.configure();
    linuxSlave.setLabels(label);
    ExternalNodeConfig nodeConfig = new ExternalNodeConfig(linuxSlave);
    nodeConfig.setConfig(DISK_POOL_ID, DISK_ONE, DISK_TWO, fakeMountingPoint);
    linuxSlave.save();
}
Also used : Slave(org.jenkinsci.test.acceptance.po.Slave) SlaveController(org.jenkinsci.test.acceptance.slave.SlaveController) LocalSlaveController(org.jenkinsci.test.acceptance.slave.LocalSlaveController) LocalSlaveController(org.jenkinsci.test.acceptance.slave.LocalSlaveController) ExternalNodeConfig(org.jenkinsci.test.acceptance.plugins.external_workspace_manager.ExternalNodeConfig)

Aggregations

Slave (org.jenkinsci.test.acceptance.po.Slave)2 LocalSlaveController (org.jenkinsci.test.acceptance.slave.LocalSlaveController)2 AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)1 ExternalNodeConfig (org.jenkinsci.test.acceptance.plugins.external_workspace_manager.ExternalNodeConfig)1 FreeStyleJob (org.jenkinsci.test.acceptance.po.FreeStyleJob)1 SlaveController (org.jenkinsci.test.acceptance.slave.SlaveController)1 Test (org.junit.Test)1