use of com.spotify.helios.common.protocol.JobDeployResponse in project helios by spotify.
the class CliDeploymentTest method testDeployingNonexistantHostJson.
@Test
public void testDeployingNonexistantHostJson() throws Exception {
startDefaultMaster();
// Wait for master to come up
Polling.await(LONG_WAIT_SECONDS, SECONDS, new Callable<String>() {
@Override
public String call() throws Exception {
final String output = cli("masters");
return output.contains(masterName()) ? output : null;
}
});
// Create job
final JobId jobId = createJob(testJobName, testJobVersion, BUSYBOX, IDLE_COMMAND);
// Verify that deploying a job to a nonexistent host fails
final String output = cli("deploy", "--json", jobId.toString(), BOGUS_HOST);
final JobDeployResponse jobDeployResponse = Json.read(output, JobDeployResponse.class);
assertEquals(JobDeployResponse.Status.HOST_NOT_FOUND, jobDeployResponse.getStatus());
}
Aggregations