use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.image.Image in project cloudbreak by hortonworks.
the class FreeIpaImageProviderTest method doTestGetImageGivenNoInput.
private void doTestGetImageGivenNoInput() {
ImageSettingsRequest is = setupImageSettingsRequest(null, null, null);
Image image = underTest.getImage(is, DEFAULT_REGION, DEFAULT_PLATFORM).get().getImage();
assertEquals(DEFAULT_OS, image.getOs());
assertEquals(LATEST_DATE_NO_INPUT, image.getDate());
assertEquals("71851893-8340-411d-afb7-e1b55107fb10", image.getUuid());
}
use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.image.Image in project cloudbreak by hortonworks.
the class FreeIpaImageProviderTest method testGetImagesNoInput.
@Test
public void testGetImagesNoInput() {
ImageSettingsRequest imageSettingsRequest = setupImageSettingsRequest(null, null, null);
List<ImageWrapper> images = underTest.getImages(imageSettingsRequest, DEFAULT_REGION, DEFAULT_PLATFORM);
assertEquals(2, images.size());
assertThat(images, everyItem(allOf(hasProperty("image", hasProperty("os", is(DEFAULT_OS))), hasProperty("catalogUrl", is(DEFAULT_CATALOG_URL)), hasProperty("catalogName", is(nullValue())))));
assertThat(images, hasItem(allOf(hasProperty("image", allOf(hasProperty("uuid", is(IMAGE_UUID)), hasProperty("date", is(LATEST_DATE)))))));
assertThat(images, hasItem(allOf(hasProperty("image", allOf(hasProperty("uuid", is("71851893-8340-411d-afb7-e1b55107fb10")), hasProperty("date", is(LATEST_DATE_NO_INPUT)))))));
}
use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.image.Image in project cloudbreak by hortonworks.
the class FreeIpaImageProviderTest method testGetImageGivenAllInput.
@Test
public void testGetImageGivenAllInput() {
ImageSettingsRequest is = setupImageSettingsRequest(EXISTING_ID, CUSTOM_IMAGE_CATALOG_URL, DEFAULT_OS);
Image image = underTest.getImage(is, DEFAULT_REGION, DEFAULT_PLATFORM).get().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.image.Image in project cloudbreak by hortonworks.
the class FreeIpaImageProviderTest method testGetImagesGivenUuidInputFound.
@Test
public void testGetImagesGivenUuidInputFound() {
ImageSettingsRequest is = setupImageSettingsRequest(IMAGE_UUID, 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.image.Image in project cloudbreak by hortonworks.
the class FreeIpaImageProviderTest method testGetImageGivenUuidInputFound.
@Test
public void testGetImageGivenUuidInputFound() {
ImageSettingsRequest is = setupImageSettingsRequest(IMAGE_UUID, null, null);
Image image = underTest.getImage(is, DEFAULT_REGION, DEFAULT_PLATFORM).get().getImage();
assertEquals(IMAGE_UUID, image.getUuid());
}
Aggregations