use of com.paulhammant.buildradiator.model.Radiator in project BuildRadiator by BuildRadiator.
the class RadiatorIntegrationTest method radiatorCanBeUpdatedWithWithBuildStepFailure.
@Test
public void radiatorCanBeUpdatedWithWithBuildStepFailure() {
Radiator rad = rad("aaa", "sseeccrreett", stepNames("A", "B"), build("1", "running", 0, step("A", 0, "running"), step("B")));
app = new TestVersionOfBuildRadiatorApp(rad);
startApp();
given().params("build", "1", "step", "A", "secret", "sseeccrreett").when().post("/r/aaa/stepFailed").then().statusCode(200).body(equalTo("OK"));
Build build = rad.builds.get(0);
assertThat(build.status, equalTo("failed"));
assertThat(build.steps.get(0).status, equalTo("failed"));
assertThat(build.steps.get(1).status, equalTo("skipped"));
}
use of com.paulhammant.buildradiator.model.Radiator in project BuildRadiator by BuildRadiator.
the class RadiatorIntegrationTest method radiatorCanBeUpdatedWithWithCancelledBuild.
@Test
public void radiatorCanBeUpdatedWithWithCancelledBuild() {
Radiator rad = rad("aaa", "sseeccrreett", stepNames("A", "B"), build("1", "running", 0, step("A", 0, "running"), step("B")));
app = new TestVersionOfBuildRadiatorApp(rad);
startApp();
given().params("build", "1", "step", "A", "secret", "sseeccrreett").when().post("/r/aaa/buildCancelled").then().statusCode(200).body(equalTo("OK"));
Build build = rad.builds.get(0);
assertThat(build.status, equalTo("cancelled"));
ArrayList<Step> steps = build.steps;
assertThat(steps.get(0).name, equalTo("A"));
assertThat(steps.get(0).status, equalTo("cancelled"));
assertThat(steps.get(1).name, equalTo("B"));
assertThat(steps.get(1).status, equalTo("cancelled"));
}
Aggregations