Package org.jclouds.dynect.v3.parse

Examples of org.jclouds.dynect.v3.parse.DeleteZoneResponseTest


         .addHeader("Auth-Token", authToken)
         .payload(stringPayload("{\"thaw\":true}"))
         .build();  

   public void testThawWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, thaw, deleteResponse);
      assertEquals(success.getZoneApi().thaw("jclouds.org").toString(),
                   new DeleteZoneResponseTest().expected().toString());
   }
View Full Code Here


   HttpResponse listResponse = HttpResponse.builder().statusCode(OK.getStatusCode())
         .payload(payloadFromResourceWithContentType("/list_geo_regiongroups.json", APPLICATION_JSON)).build();

   public void testListWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, list, listResponse);
      assertEquals(success.getGeoRegionGroupApiForService("srv").list().toString(),
            new ListGeoRegionGroupsResponseTest().expected().toString());
   }
View Full Code Here

   HttpResponse getResponse = HttpResponse.builder().statusCode(OK.getStatusCode())
         .payload(payloadFromResourceWithContentType("/get_geo_regiongroup.json", APPLICATION_JSON)).build();

   public void testGetWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, get, getResponse);
      assertEquals(success.getGeoRegionGroupApiForService("srv").get("Everywhere Else").toString(),
            new GetGeoRegionGroupResponseTest().expected().toString());
   }
View Full Code Here

* @author Adrian Cole
*/
@Test(groups = "unit", testName = "DynECTProviderMetadataTest")
public class DynECTProviderMetadataTest extends BaseProviderMetadataTest {
   public DynECTProviderMetadataTest() {
      super(new DynECTProviderMetadata(), new DynECTApiMetadata());
   }
View Full Code Here

* @author Adrian Cole
*/
@Test(groups = "unit", testName = "DynECTProviderMetadataTest")
public class DynECTProviderMetadataTest extends BaseProviderMetadataTest {
   public DynECTProviderMetadataTest() {
      super(new DynECTProviderMetadata(), new DynECTApiMetadata());
   }
View Full Code Here

      for (String service : geoApi().list()) {
         GeoRegionGroupApi api = api(service);
         ImmutableList<String> groups = api.list().toList();
         getAnonymousLogger().info("geo service: " + service + " group count: " + groups.size());
         for (String group : groups) {
            GeoRegionGroup groupDetail = api.get(group);
            assertNotNull(groupDetail.getServiceName().get(), "ServiceName cannot be null " + groupDetail);
            checkGeoRegionGroup(groupDetail);
         }
      }
   }
View Full Code Here

   String zoneFQDN = System.getProperty("user.name").replace('.', '-') + ".record.dynecttest.jclouds.org";
   String contact = JcloudsVersion.get() + ".jclouds.org";

   private void createZone() {
      Job job = zoneApi().scheduleCreateWithContact(zoneFQDN, contact);
      checkNotNull(job, "unable to create zone %s", zoneFQDN);
      getAnonymousLogger().info("created zone: " + job);
      assertEquals(job.getStatus(), Status.SUCCESS);
      assertEquals(api.getJob(job.getId()), job);
      Zone zone = zoneApi().publish(zoneFQDN);
      checkNotNull(zone, "unable to publish zone %s", zoneFQDN);
      getAnonymousLogger().info("published zone: " + zone);
   }
View Full Code Here

                                            .build();

   public void testCreateRecord() {
      createZone();

      Job job = null;
      while (true) {
         try {
            job = api(zoneFQDN).scheduleCreate(record);
            break;
         } catch (JobStillRunningException e) {
            continue;
         }
      }

      checkNotNull(job, "unable to create record %s", record);
      getAnonymousLogger().info("created record: " + job);
      assertEquals(job.getStatus(), Status.SUCCESS);
      assertEquals(api.getJob(job.getId()), job);
      zoneApi().publish(zoneFQDN);
   }
View Full Code Here

      checkRecord(newRecord);
   }

   @Test(dependsOnMethods = { "testListByFQDNAndType", "testListByFQDN" })
   public void testDeleteRecord() {
      Job job = api(zoneFQDN).scheduleDelete(id);
      checkNotNull(job, "unable to delete record %s", id);
      getAnonymousLogger().info("deleted record: " + job);
      assertEquals(job.getStatus(), Status.SUCCESS);
      assertEquals(api.getJob(job.getId()), job);
      zoneApi().publish(zoneFQDN);
   }
View Full Code Here

   String fqdn = System.getProperty("user.name").replace('.', '-') + ".zone.dynecttest.jclouds.org";
   String contact = JcloudsVersion.get() + ".jclouds.org";

   @Test
   public void testCreateZone() {
      Job job = api().scheduleCreateWithContact(fqdn, contact);
      checkNotNull(job, "unable to create zone %s", fqdn);
      getAnonymousLogger().info("created zone: " + job);
      assertEquals(job.getStatus(), Status.SUCCESS);
      assertEquals(api.getJob(job.getId()), job);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.dynect.v3.parse.DeleteZoneResponseTest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.