mirror of
https://github.com/Fishwaldo/rundeck-api-java-client.git
synced 2025-07-13 08:28:19 +00:00
Fix issue if history query has no post content
This commit is contained in:
parent
c86a9a1b6e
commit
26f3038bb1
5 changed files with 72 additions and 2 deletions
|
@ -101,6 +101,24 @@ public class RundeckClientTest {
|
|||
Assert.assertEquals(Arrays.asList("fliff", "malk/blah3"), names);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Betamax(tape = "get_history_user",
|
||||
match = {MatchRule.uri, MatchRule.method, MatchRule.path, MatchRule.query })
|
||||
public void getHistoryUser() throws Exception {
|
||||
final RundeckHistory test = client.getHistory("demo", "bob", (String)null, (List)null, null, null, null, null, null);
|
||||
Assert.assertEquals(1, test.getCount());
|
||||
Assert.assertEquals(20, test.getMax());
|
||||
Assert.assertEquals(0, test.getOffset());
|
||||
Assert.assertEquals(1, test.getTotal());
|
||||
final List<RundeckEvent> events = test.getEvents();
|
||||
Assert.assertEquals(1, events.size());
|
||||
final List<String> names = new ArrayList<String>();
|
||||
for (final RundeckEvent event : events) {
|
||||
names.add(event.getUser());
|
||||
}
|
||||
Assert.assertEquals(Arrays.asList("bob"), names);
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
// not that you can put whatever here, because we don't actually connect to the RunDeck instance
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue