} else { final JobId jobId = status.getDeploymentGroup().getJobId(); final String error = status.getError(); final List<HostSelector> hostSelectors = status.getDeploymentGroup().getHostSelectors();
@Test public void testStopDeploymentGroup() throws Exception { cli("create-deployment-group", "--json", TEST_GROUP, "foo=bar", "baz=qux"); cli("create", "my_job:2", "my_image"); assertThat(cli("stop-deployment-group", TEST_GROUP), containsString("Deployment-group my_group stopped")); final DeploymentGroupStatusResponse status = Json.read( cli("deployment-group-status", "--json", TEST_GROUP), DeploymentGroupStatusResponse.class); assertEquals(DeploymentGroupStatusResponse.Status.FAILED, status.getStatus()); assertEquals("Stopped by user", status.getError()); }
if (status.getStatus() == DeploymentGroupStatusResponse.Status.FAILED) { failed = true; error = status.getError();
} else { final JobId jobId = status.getDeploymentGroup().getJobId(); final String error = status.getError(); final List<HostSelector> hostSelectors = status.getDeploymentGroup().getHostSelectors();
if (status.getStatus() == DeploymentGroupStatusResponse.Status.FAILED) { failed = true; error = status.getError();