mirror of https://github.com/apache/jclouds.git
fixed bad assertion in delete rrpool in ultradns
This commit is contained in:
parent
c76c599f77
commit
e7bdfa65f9
|
@ -25,7 +25,7 @@ import org.jclouds.http.HttpResponse;
|
|||
import org.jclouds.ultradns.ws.UltraDNSWSApi;
|
||||
import org.jclouds.ultradns.ws.UltraDNSWSExceptions.ResourceAlreadyExistsException;
|
||||
import org.jclouds.ultradns.ws.internal.BaseUltraDNSWSApiExpectTest;
|
||||
import org.jclouds.ultradns.ws.parse.GetLoadBalancingPoolsByZoneResponseTest;
|
||||
import org.jclouds.ultradns.ws.parse.GetRRLoadBalancingPoolsByZoneResponseTest;
|
||||
import org.jclouds.ultradns.ws.parse.GetResourceRecordsOfResourceRecordResponseTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
|
@ -79,7 +79,7 @@ public class RoundRobinPoolApiExpectTest extends BaseUltraDNSWSApiExpectTest {
|
|||
|
||||
assertEquals(
|
||||
success.getRoundRobinPoolApiForZone("jclouds.org.").list().toString(),
|
||||
new GetLoadBalancingPoolsByZoneResponseTest().expected().toString());
|
||||
new GetRRLoadBalancingPoolsByZoneResponseTest().expected().toString());
|
||||
}
|
||||
|
||||
HttpRequest listRecords = HttpRequest.builder().method("POST")
|
||||
|
@ -108,7 +108,7 @@ public class RoundRobinPoolApiExpectTest extends BaseUltraDNSWSApiExpectTest {
|
|||
|
||||
public void testDeleteWhenResponseIs2xx() {
|
||||
UltraDNSWSApi success = requestSendsResponse(delete, deleteResponse);
|
||||
success.getZoneApi().delete("04053D8E57C7931F");
|
||||
success.getRoundRobinPoolApiForZone("jclouds.org.").delete("04053D8E57C7931F");
|
||||
}
|
||||
|
||||
HttpResponse poolDoesntExist = HttpResponse.builder().message("Server Epoolor").statusCode(500)
|
||||
|
@ -116,6 +116,6 @@ public class RoundRobinPoolApiExpectTest extends BaseUltraDNSWSApiExpectTest {
|
|||
|
||||
public void testDeleteWhenResponseRRNotFound() {
|
||||
UltraDNSWSApi notFound = requestSendsResponse(delete, poolDoesntExist);
|
||||
notFound.getZoneApi().delete("04053D8E57C7931F");
|
||||
notFound.getRoundRobinPoolApiForZone("jclouds.org.").delete("04053D8E57C7931F");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,17 +61,18 @@ public class RoundRobinPoolApiLiveTest extends BaseUltraDNSWSApiLiveTest {
|
|||
context.getApi().getZoneApi().createInAccount(zoneName, account.getId());
|
||||
}
|
||||
|
||||
private void checkLBPool(RoundRobinPool pool) {
|
||||
private void checkRRPool(RoundRobinPool pool) {
|
||||
checkNotNull(pool.getZoneId(), "ZoneId cannot be null for a RoundRobinPool %s", pool);
|
||||
checkNotNull(pool.getId(), "Id cannot be null for a RoundRobinPool %s", pool);
|
||||
checkNotNull(pool.getName(), "Name cannot be null for a RoundRobinPool %s", pool);
|
||||
checkNotNull(pool.getDName(), "DName cannot be null for a RoundRobinPool %s", pool);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testListRRPools() {
|
||||
for (Zone zone : context.getApi().getZoneApi().listByAccount(account.getId())) {
|
||||
for (RoundRobinPool pool : api(zone.getName()).list()) {
|
||||
checkLBPool(pool);
|
||||
checkRRPool(pool);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,8 +33,8 @@ import com.google.common.collect.ImmutableList;
|
|||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(testName = "GetLoadBalancingPoolsByZoneResponseTest")
|
||||
public class GetLoadBalancingPoolsByZoneResponseTest extends BaseHandlerTest {
|
||||
@Test(testName = "GetRRLoadBalancingPoolsByZoneResponseTest")
|
||||
public class GetRRLoadBalancingPoolsByZoneResponseTest extends BaseHandlerTest {
|
||||
|
||||
public void test() {
|
||||
InputStream is = getClass().getResourceAsStream("/rrpools.xml");
|
||||
|
@ -50,19 +50,19 @@ public class GetLoadBalancingPoolsByZoneResponseTest extends BaseHandlerTest {
|
|||
public FluentIterable<RoundRobinPool> expected() {
|
||||
return FluentIterable.from(ImmutableList.<RoundRobinPool> builder()
|
||||
.add(RoundRobinPool.builder()
|
||||
.zoneId("0000000000000001")
|
||||
.id("000000000000002")
|
||||
.name("app-uswest1.jclouds.org.")
|
||||
.dname("app-uswest1.jclouds.org.").build())
|
||||
.zoneId("0000000000000001")
|
||||
.id("000000000000002")
|
||||
.name("app-uswest1.jclouds.org.")
|
||||
.dname("app-uswest1.jclouds.org.").build())
|
||||
.add(RoundRobinPool.builder()
|
||||
.zoneId("0000000000000001")
|
||||
.id("000000000000003")
|
||||
.name("app-uswest2.jclouds.org.")
|
||||
.dname("app-uswest2.jclouds.org.").build())
|
||||
.zoneId("0000000000000001")
|
||||
.id("000000000000003")
|
||||
.name("app-uswest2.jclouds.org.")
|
||||
.dname("app-uswest2.jclouds.org.").build())
|
||||
.add(RoundRobinPool.builder()
|
||||
.zoneId("0000000000000001")
|
||||
.id("000000000000004")
|
||||
.name("app-euwest.jclouds.org.")
|
||||
.dname("app-euwest.jclouds.org.").build()).build());
|
||||
.zoneId("0000000000000001")
|
||||
.id("000000000000004")
|
||||
.name("app-euwest.jclouds.org.")
|
||||
.dname("app-euwest.jclouds.org.").build()).build());
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v01="http://webservice.api.ultra.neustar.com/v01/"><soapenv:Header><wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:UsernameToken><wsse:Username>identity</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">credential</wsse:Password></wsse:UsernameToken></wsse:Security></soapenv:Header><soapenv:Body><v01:deleteZone><transactionID /><zoneName>04053D8E57C7931F</zoneName></v01:deleteZone></soapenv:Body></soapenv:Envelope>
|
||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v01="http://webservice.api.ultra.neustar.com/v01/"><soapenv:Header><wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:UsernameToken><wsse:Username>identity</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">credential</wsse:Password></wsse:UsernameToken></wsse:Security></soapenv:Header><soapenv:Body><v01:deleteLBPool><transactionID /><lbPoolID>04053D8E57C7931F</lbPoolID><DeleteAll>Yes</DeleteAll><retainRecordId /></v01:deleteLBPool></soapenv:Body></soapenv:Envelope>
|
Loading…
Reference in New Issue