use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.image.ImageSettingsRequest in project cloudbreak by hortonworks.
the class FreeIpaImageProviderTest method testGetImagesGivenUuidInputNotFoundWithNotDefaultOs.
@Test
public void testGetImagesGivenUuidInputNotFoundWithNotDefaultOs() {
ImageSettingsRequest is = setupImageSettingsRequest(NON_DEFAULT_OS_IMAGE_UUID, null, null);
List<ImageWrapper> images = underTest.getImages(is, DEFAULT_REGION, DEFAULT_PLATFORM);
assertTrue(images.isEmpty());
}
use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.image.ImageSettingsRequest in project cloudbreak by hortonworks.
the class FreeIpaImageProviderTest method testGetImagesGivenIdInputFound.
@Test
public void testGetImagesGivenIdInputFound() {
ImageSettingsRequest is = setupImageSettingsRequest(EXISTING_ID, null, null);
List<ImageWrapper> images = underTest.getImages(is, DEFAULT_REGION, DEFAULT_PLATFORM);
assertEquals(1, images.size());
ImageWrapper imageWrapper = images.get(0);
assertEquals(DEFAULT_CATALOG_URL, imageWrapper.getCatalogUrl());
assertNull(imageWrapper.getCatalogName());
Image image = imageWrapper.getImage();
assertEquals(DEFAULT_OS, image.getOs());
assertEquals(LATEST_DATE, image.getDate());
assertEquals(IMAGE_UUID, image.getUuid());
}
use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.image.ImageSettingsRequest in project cloudbreak by hortonworks.
the class FreeIpaImageProviderTest method testGetImagesGivenIdInputNotFound.
@Test
public void testGetImagesGivenIdInputNotFound() {
ImageSettingsRequest is = setupImageSettingsRequest(NON_EXISTING_ID, null, null);
List<ImageWrapper> images = underTest.getImages(is, DEFAULT_REGION, DEFAULT_PLATFORM);
assertTrue(images.isEmpty());
}
use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.image.ImageSettingsRequest in project cloudbreak by hortonworks.
the class FreeIpaImageProviderTest method testGetImageGivenUuidInputFoundWithNotDefaultOs.
@Test
public void testGetImageGivenUuidInputFoundWithNotDefaultOs() {
ImageSettingsRequest is = setupImageSettingsRequest(NON_DEFAULT_OS_IMAGE_UUID, null, null);
Image image = underTest.getImage(is, DEFAULT_REGION, DEFAULT_PLATFORM).get().getImage();
assertEquals(NON_DEFAULT_OS_IMAGE_UUID, image.getUuid());
}
use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.common.image.ImageSettingsRequest in project cloudbreak by hortonworks.
the class FreeIpaImageProviderTest method setupImageSettingsRequest.
private ImageSettingsRequest setupImageSettingsRequest(String id, String catalog, String os) {
ImageSettingsRequest is = new ImageSettingsRequest();
is.setId(id);
is.setCatalog(catalog);
is.setOs(os);
return is;
}
Aggregations