コード例 #1
0
 @Test(
     expectedExceptions = ResourceNotFoundException.class,
     expectedExceptionsMessageRegExp = "Directional Pool Record does not exist in the system")
 public void testUpdateRecordWhenResponseNotFound() {
   UltraDNSWSApi notFound = requestSendsResponse(updateRecord, recordDoesntExist);
   notFound.getDirectionalPoolApiForZone("jclouds.org.").updateRecord("04053D8E57C7931F", record);
 }
コード例 #2
0
  public void testListWhenResponseIs2xx() {
    UltraDNSWSApi success = requestSendsResponse(list, listResponse);

    assertEquals(
        success.getDirectionalPoolApiForZone("jclouds.org.").list().toString(),
        new GetDirectionalPoolsByZoneResponseTest().expected().toString());
  }
コード例 #3
0
 public void testCreateWhenResponseIs2xx() {
   UltraDNSWSApi success = requestSendsResponse(create, createResponse);
   assertEquals(
       success
           .getDirectionalPoolApiForZone("jclouds.org.")
           .createForDNameAndType("foo", "www.jclouds.org.", IPV4.getCode()),
       "06063DC355055E68");
 }
コード例 #4
0
 public void testAddRecordIntoExistingGroupWhenResponseIs2xx() {
   UltraDNSWSApi success = requestSendsResponse(addRecordIntoExistingGroup, recordCreatedResponse);
   assertEquals(
       success
           .getDirectionalPoolApiForZone("jclouds.org.")
           .addRecordIntoExistingGroup("06063DC355055E68", record, "AAABBBCCCDDDEEE"),
       "06063DC355058294");
 }
コード例 #5
0
 public void testAddFirstRecordInNonConfiguredGroupWhenResponseIs2xx() {
   UltraDNSWSApi success =
       requestSendsResponse(addFirstRecordInNonConfiguredGroup, recordCreatedResponse);
   assertEquals(
       success
           .getDirectionalPoolApiForZone("jclouds.org.")
           .addFirstRecordInNonConfiguredGroup("06063DC355055E68", record),
       "06063DC355058294");
 }
コード例 #6
0
 @Test(
     expectedExceptions = ResourceAlreadyExistsException.class,
     expectedExceptionsMessageRegExp =
         "Pool already created for this host name : www.jclouds.org.")
 public void testCreateWhenResponseError2912() {
   UltraDNSWSApi already = requestSendsResponse(create, alreadyCreated);
   already
       .getDirectionalPoolApiForZone("jclouds.org.")
       .createForDNameAndType("foo", "www.jclouds.org.", IPV4.getCode());
 }
コード例 #7
0
  public void testListRecordsWhenResponseIs2xx() {
    UltraDNSWSApi success = requestSendsResponse(listRecords, listRecordsResponse);

    assertEquals(
        success
            .getDirectionalPoolApiForZone("jclouds.org.")
            .listRecordsByDNameAndType("www.jclouds.org.", 1)
            .toString(),
        new GetDirectionalDNSRecordsForHostResponseTest().expected().toString());
  }
コード例 #8
0
 @Test(
     expectedExceptions = ResourceAlreadyExistsException.class,
     expectedExceptionsMessageRegExp = "Resource Record already exists.")
 public void testAddFirstRecordInNonConfiguredGroupWhenResponseError1802() {
   UltraDNSWSApi already =
       requestSendsResponse(addFirstRecordInNonConfiguredGroup, recordAlreadyCreated);
   already
       .getDirectionalPoolApiForZone("jclouds.org.")
       .addFirstRecordInNonConfiguredGroup("06063DC355055E68", record);
 }
コード例 #9
0
 /** in UltraDNS, zones are scoped to an account. */
 @Override
 public Iterator<String> list() {
   return api.getZoneApi()
       .listByAccount(account.get().getId())
       .transform(ZoneName.INSTANCE)
       .iterator();
 }
コード例 #10
0
 public void testDeleteRecordWhenResponseNotFound() {
   UltraDNSWSApi notFound = requestSendsResponse(deleteRecord, recordDoesntExist);
   notFound.getDirectionalPoolApiForZone("jclouds.org.").deleteRecord("04053D8E57C7931F");
 }
コード例 #11
0
 public void testDeleteRecordWhenResponseIs2xx() {
   UltraDNSWSApi success = requestSendsResponse(deleteRecord, deleteRecordResponse);
   success.getDirectionalPoolApiForZone("jclouds.org.").deleteRecord("04053D8E57C7931F");
 }
コード例 #12
0
 public void testUpdateRecordAndGroupWhenResponseIs2xx() {
   UltraDNSWSApi success = requestSendsResponse(updateRecordAndGroup, updateRecordResponse);
   success
       .getDirectionalPoolApiForZone("jclouds.org.")
       .updateRecordAndGroup("04053D8E57C7931F", record, group);
 }