public void testCreateDroplet() throws InterruptedException { server.enqueue(jsonResponse("/droplet-create-res.json")); DropletCreate droplet = api.dropletApi().create("digitalocean2-s-d5e", "sfo1", "512mb", "6374124", CreateDropletOptions.builder().addSshKeyId(421192).build()); assertEquals(droplet, objectFromResource("/droplet-create-res.json", DropletCreate.class)); assertEquals(server.getRequestCount(), 1); assertSent(server, "POST", "/droplets", stringFromResource("/droplet-create-req.json")); }
DropletCreate dropletCreated = api.dropletApi().create(name, template.getLocation().getId(), template.getHardware().getProviderId(),
DropletCreate dropletCreated = api.dropletApi().create(name, template.getLocation().getId(), template.getHardware().getProviderId(),
DropletCreate dropletCreated = api.dropletApi().create(name, template.getLocation().getId(), template.getHardware().getProviderId(),
public void testCreate() { DropletCreate dropletCreate = api().create(prefix + "-droplet-livetest", region.slug(), size.slug(), image.slug(), CreateDropletOptions.builder().backupsEnabled(true).addSshKeyId(key.id()).build()); dropletId = dropletCreate.droplet().id(); assertNodeRunning(dropletId); Droplet droplet = api().get(dropletId); assertNotNull(droplet, "Droplet should not be null"); }