Add tests for all projects running exec query v8

This commit is contained in:
Greg Schueler 2013-08-21 10:22:48 -07:00
parent 4249dd54bb
commit 46c204b28d
2 changed files with 67 additions and 0 deletions

View file

@ -928,6 +928,23 @@ public class RundeckClientTest {
Assert.assertEquals("test2", exec2.getProject());
}
/**
* Running executions for all projects using API v8, which queries for project list and then individually
* queries each project's now running
* @throws Exception
*/
@Test
@Betamax(tape = "running_executions_v8")
public void runningExecutionsV8() throws Exception {
final RundeckClient client = createClient(TEST_TOKEN_5, 8);
List<RundeckExecution> runningExecutions = client.getRunningExecutions();
Assert.assertEquals(2, runningExecutions.size());
RundeckExecution exec1 = runningExecutions.get(0);
Assert.assertEquals("test", exec1.getProject());
RundeckExecution exec2 = runningExecutions.get(1);
Assert.assertEquals("test2", exec2.getProject());
}
@Before
public void setUp() throws Exception {
// not that you can put whatever here, because we don't actually connect to the RunDeck instance