use of com.paulhammant.buildradiator.model.Radiator in project BuildRadiator by BuildRadiator.
the class RadiatorIntegrationTest method radiatorCannotBeUpdatedWithWithBuildStartForBogusStep.
@Test
public void radiatorCannotBeUpdatedWithWithBuildStartForBogusStep() {
Radiator rad = rad("aaa", "sseeccrreett", stepNames("A"));
app = new TestVersionOfBuildRadiatorApp(rad);
startApp();
postStepStartedAndConfirmTestResponse("aaa", "sseeccrreett", "1", "DoesntExist", 200, "unknown step");
Step step = rad.builds.get(0).steps.get(0);
assertThat(step.status, equalTo(""));
}
use of com.paulhammant.buildradiator.model.Radiator in project BuildRadiator by BuildRadiator.
the class RadiatorIntegrationTest method radiatorCanBeCreatedWithRestrictedIpAddressesAndStillAllowAccess.
@Test
public void radiatorCanBeCreatedWithRestrictedIpAddressesAndStillAllowAccess() {
Radiator rad = rad("aaa", "sseeccrreett", stepNames("A")).withIpAccessRestrictedToThese("127.0.0.1");
app = new TestVersionOfBuildRadiatorApp(rad);
startApp();
postStepStartedAndConfirmTestResponse("aaa", "sseeccrreett", "1", "A", 200, "OK");
}
use of com.paulhammant.buildradiator.model.Radiator in project BuildRadiator by BuildRadiator.
the class RadiatorIntegrationTest method radiatorCanBeCreatedWithRestrictedIpAddressesAndBlockAccess.
@Test
public void radiatorCanBeCreatedWithRestrictedIpAddressesAndBlockAccess() {
Radiator rad = rad("aaa", "sseeccrreett", stepNames("A")).withIpAccessRestrictedToThese("111.111.111.111", "222.222.222.222");
app = new TestVersionOfBuildRadiatorApp(rad);
startApp();
postStepStartedAndConfirmTestResponse("aaa", "sseeccrreett", "1", "A", 200, "ip address 127.0.0.1 not authorized");
}
use of com.paulhammant.buildradiator.model.Radiator in project BuildRadiator by BuildRadiator.
the class RadiatorIntegrationTest method buildCannotBeStartedTwice.
@Test
public void buildCannotBeStartedTwice() {
Radiator rad = rad("aaa", "sseeccrreett", stepNames("A"), build("222", "running", 0, step("A", 0, "running")));
app = new TestVersionOfBuildRadiatorApp(rad);
startApp();
postStepStartedAndConfirmTestResponse("aaa", "sseeccrreett", "222", "A", 200, "wrong build state");
}
use of com.paulhammant.buildradiator.model.Radiator in project BuildRadiator by BuildRadiator.
the class RadiatorIntegrationTest method radiatorCanBeUpdatedWithWithBuildStepCompletion.
@Test
public void radiatorCanBeUpdatedWithWithBuildStepCompletion() {
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/stepPassed").then().statusCode(200).body(equalTo("OK"));
ArrayList<Step> steps = rad.builds.get(0).steps;
assertThat(steps.get(0).name, equalTo("A"));
assertThat(steps.get(0).status, equalTo("passed"));
}
Aggregations