use of org.jenkinsci.test.acceptance.po.Slave in project acceptance-test-harness by jenkinsci.
the class ScriptlerPluginTest method run_on_all_slaves.
@Test
public void run_on_all_slaves() throws Exception {
Slave slaveA = slaves.install(jenkins).get();
Slave slaveB = slaves.install(jenkins).get();
Script script = scriptler.upload(SIMPLE_SCRIPT);
ScriptResult output = script.runOnAllSlaves();
assertThat(output.output(jenkins), nullValue());
assertThat(output.output(slaveA), equalTo("Hello world!"));
assertThat(output.output(slaveB), equalTo("Hello world!"));
}
use of org.jenkinsci.test.acceptance.po.Slave in project acceptance-test-harness by jenkinsci.
the class ScriptlerPluginTest method run_on_slave.
@Test
public void run_on_slave() throws Exception {
Slave slave = slaves.install(jenkins).get();
Script script = scriptler.upload(SIMPLE_SCRIPT);
String output = script.runOn(slave).output(slave);
assertThat(output, equalTo("Hello world!"));
}
use of org.jenkinsci.test.acceptance.po.Slave 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() + ")"));
}
Aggregations