adding tests to image client live test

This commit is contained in:
Mike Arnold 2012-03-13 10:04:09 -05:00
parent 6cee8b9581
commit 11ae8ee7cc
1 changed files with 4 additions and 2 deletions

View File

@ -40,10 +40,11 @@ public class ImageClientLiveTest extends BaseNovaClientLiveTest {
for (String regionId : context.getApi().getConfiguredRegions()) {
ImageClient client = context.getApi().getImageClientForRegion(regionId);
Set<Resource> response = client.listImages();
assert null != response;
assertNotNull(response);
assertTrue(response.size() >= 0);
for (Resource image : response) {
Image newDetails = client.getImage(image.getId());
assertNotNull(newDetails);
assertEquals(newDetails.getId(), image.getId());
assertEquals(newDetails.getName(), image.getName());
assertEquals(newDetails.getLinks(), image.getLinks());
@ -56,10 +57,11 @@ public class ImageClientLiveTest extends BaseNovaClientLiveTest {
for (String regionId : context.getApi().getConfiguredRegions()) {
ImageClient client = context.getApi().getImageClientForRegion(regionId);
Set<Image> response = client.listImagesInDetail();
assert null != response;
assertNotNull(response);
assertTrue(response.size() >= 0);
for (Image image : response) {
Image newDetails = client.getImage(image.getId());
assertNotNull(newDetails);
assertEquals(newDetails.getId(), image.getId());
assertEquals(newDetails.getName(), image.getName());
assertEquals(newDetails.getLinks(), image.getLinks());