@Override @AfterClass(groups = { "integration", "live" }) protected void tearDownContext() { for (String imageId : imagesToDeregister) client.deregisterImageInRegion(regionId, imageId); for (String snapshotId : snapshotsToDelete) ec2Api.getElasticBlockStoreApi().get().deleteSnapshotInRegion(regionId, snapshotId); super.tearDownContext(); }
@AfterClass(groups = { "integration", "live" }) @Override protected void tearDownContext() { try { client.deleteSnapshotInRegion(defaultRegion, snapshot.getId()); client.deleteVolumeInRegion(defaultRegion, volumeId); } catch (Exception e) { // we don't really care about any exception here, so just delete away. } super.tearDownContext(); }
@Test(dependsOnMethods = "testDeleteVolumeInRegion") void testDeleteSnapshotInRegion() { client.deleteSnapshotInRegion(defaultRegion, snapshot.getId()); assert client.describeSnapshotsInRegion(defaultRegion, snapshotIds(snapshot.getId())).size() == 0; }
client.getElasticBlockStoreApi().get().deleteSnapshotInRegion(snapshot.getRegion(), snapshot.getId()); } catch (Exception e) { e.printStackTrace();
ebsClient.deleteSnapshotInRegion(snapshot.getRegion(), snapshot.getId());