Support keyed config get/set/delete for apiv11

This commit is contained in:
Greg Schueler 2014-03-07 12:22:10 -08:00
parent 29459d9ee1
commit f49aa63043
10 changed files with 430 additions and 0 deletions

View file

@ -116,6 +116,35 @@ public class RundeckClientTest {
Assert.assertEquals("a big amazing thingy so there.", result.getProperties().get("blha.blee"));
}
@Test
@Betamax(tape = "get_project_config_keyedv11")
public void getProjectConfigKeyed() throws Exception {
String value = createClient(TEST_TOKEN_6, 11).getProjectConfig("ABC", "project.name");
Assert.assertNotNull(value);
Assert.assertEquals("ABC", value);
}
@Test
@Betamax(tape = "get_project_config_keyed_dne_v11")
public void getProjectConfigKeyedDNE() throws Exception {
String value = createClient(TEST_TOKEN_6, 11).getProjectConfig("ABC", "does-not-exist");
Assert.assertNull(value);
}
@Test
@Betamax(tape = "set_project_config_keyedv11")
public void setProjectConfigKeyed() throws Exception {
String value = createClient(TEST_TOKEN_6, 11).setProjectConfig("ABC", "monkey-burrito", "lemon pie");
Assert.assertNotNull(value);
Assert.assertEquals("lemon pie", value);
}
@Test
@Betamax(tape = "delete_project_config_keyedv11")
public void deleteProjectConfigKeyed() throws Exception {
RundeckClient client1 = createClient(TEST_TOKEN_6, 11);
Assert.assertEquals("7up", client1.setProjectConfig("ABC", "monkey-burrito", "7up"));
client1.deleteProjectConfig("ABC", "monkey-burrito");
String value=client1.getProjectConfig("ABC", "monkey-burrito");
Assert.assertNull(value);
}
@Test
@Betamax(tape = "get_history")
public void getHistory() throws Exception {