mirror of
https://github.com/Fishwaldo/rundeck-api-java-client.git
synced 2025-07-14 17:08:32 +00:00
Expect 204 response for job delete for #14
This commit is contained in:
parent
7b6259b66b
commit
e2839d6244
4 changed files with 68 additions and 1 deletions
|
@ -1489,6 +1489,32 @@ public class RundeckClientTest {
|
|||
Assert.assertEquals(404,e.getStatusCode());
|
||||
}
|
||||
}
|
||||
/**
|
||||
* delete job
|
||||
*/
|
||||
@Test
|
||||
@Betamax(tape = "delete_job", mode = TapeMode.READ_ONLY)
|
||||
public void deleteJob() throws Exception {
|
||||
final RundeckClient client = createClient(TEST_TOKEN_7, 11);
|
||||
String result = client.deleteJob("api-test-job-run-scheduled");
|
||||
|
||||
Assert.assertEquals("Job api-test-job-run-scheduled was deleted successfully", result);
|
||||
}
|
||||
/**
|
||||
* delete job (DNE)
|
||||
*/
|
||||
@Test
|
||||
@Betamax(tape = "delete_job_not_found", mode = TapeMode.READ_ONLY)
|
||||
public void deleteJobNotFound() throws Exception {
|
||||
final RundeckClient client = createClient(TEST_TOKEN_7, 11);
|
||||
try {
|
||||
String result = client.deleteJob("does-not-exist");
|
||||
Assert.fail();
|
||||
} catch (RundeckApiException.RundeckApiHttpStatusException e) {
|
||||
Assert.assertEquals(404, e.getStatusCode());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue