> +      assertTrue(powerOffEvent > 0, "The event id should not be null");
> +      waitForEvent(powerOffEvent);
> +
> +      int event = api.getDropletApi().snapshot(droplet.getId(), 
> "testsnapshot");
> +      assertTrue(event > 0, "The event id should not be null");
> +      waitForEvent(event);
> +
> +      Optional<Image> snapshot = tryFind(api.getImageApi().list(), new 
> Predicate<Image>() {
> +         @Override
> +         public boolean apply(Image input) {
> +            return input.getName().equals("testsnapshot");
> +         }
> +      });
> +
> +      assertTrue(snapshot.isPresent(), "The created snapshot should exist in 
> the image list");
> +      api.getImageApi().delete(snapshot.get().getId());

A test failure here means we haven't been able to find the snapshot, so we 
wouldn't know what to delete...

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/49/files#r9171816

Reply via email to